Add FindKML.cmake and resolve FFTW3 issue#7576
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR adds first-class CMake support for Huawei Kunpeng Math Library (KML) via a custom FindKML.cmake, and refactors dependency linking to address FFTW3-related configuration issues.
Changes:
- Introduce
cmake/FindKML.cmakeproviding imported targets for KML BLAS/LAPACK/ScaLAPACK and FFTW3-compatible interfaces. - Update
CMakeLists.txtto usefind_package(KML ...)whenUSE_KMLis enabled and to restructure FFTW3 linking. - Adjust FFTW toolchain environment exports in
install_fftw.sh(removingCPATHandCP_*flag exports).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| toolchain/scripts/stage3/install_fftw.sh | Removes CPATH/CP_* environment exports for FFTW, affecting how downstream builds pick up FFTW headers/flags. |
| cmake/FindKML.cmake | Adds a new find-module that detects KML variants/components and defines imported targets. |
| CMakeLists.txt | Switches KML integration to find_package(KML ...) and refactors dependency linking (MPI/MKL/FFTW3). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@QuantumMisaka Please have a look if a bare build with FFTW support passes your test. |
| find_library(KML_BLAS_LIBRARY | ||
| NAMES kblas | ||
| HINTS "${_kml_prefix}" | ||
| PATH_SUFFIXES "lib/${KML_ARCH}/kblas/${_kml_blas_threading}" |
There was a problem hiding this comment.
kblas of sve512 is actually in sme/
|
|
||
| include(FindPackageHandleStandardArgs) | ||
|
|
||
| set(KML_ROOT "" CACHE PATH "KML installation prefix") |
There was a problem hiding this comment.
There are two sets of kml-tools: bisheng-based and gcc-based, which can be automatically chosen by compiler (CLANG or GCC)?
No description provided.