catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

Some comments on Accelerate LAPACKE integration

Open lepus2589 opened this issue 6 months ago • 0 comments

Following the interaction in #1726, I had a look at how Accelerate LAPACKE is integrated into the build. Here are my comments:

  1. You are referencing the master branch in runtime/CMakeLists.txt#L81. I'd strongly recommend a tag, as I can make no API stability guarantee for the master branch.
  2. Regarding runtime/CMakeLists.txt#L86: In my experience, you should never, ever move an installed CMake project from its intended install location (CMAKE_INSTALL_PREFIX) to somewhere else. This can also apply to binaries. CMake modifies the RPATH during the installation process. Do so at your own risk. If you absolutely have to, have a look at CMAKE_STAGING_PREFIX.
  3. You are only copying the binary dylib and check for its existence in subsequent runs (runtime/CMakeLists.txt#L78). Is there a reason you're not using the CMake config package provided by LAPACKE? You could use find_package(LAPACKE CONFIG PATHS "${CMAKE_BINARY_DIR}/_lapacke-accelerate/install" NO_DEFAULT_PATH) and then check the LAPACKE_FOUND variable. This would give you the lapacke imported CMake target for free.

Anyway, I'm happy my project is useful to you.

lepus2589 avatar May 14 '25 09:05 lepus2589