-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Ask
We'd like to add CLBlast to the recipes system. CLBlast is a tuned OpenCL BLAS library that provides GPU-accelerated linear algebra routines. This is a compiled static library (not headers), which should meet the recipes requirements.
Background
CLBlast is needed to enable the OpenCL backend for RcppBandicoot, which provides R bindings for the Bandicoot GPU-accelerated linear algebra library. Bandicoot uses CLBlast for optimized BLAS operations when running on OpenCL devices.
CLBlast Library Details
- Repository: https://github.com/CNugteren/CLBlast
- Latest Release: v1.6.3 (June 13, 2024)
- License: Apache-2.0
- Build System: CMake
Dependencies
CLBlast requires OpenCL headers and runtime. On macOS, it links against the system OpenCL 1.3 framework (-framework OpenCL), which is available on all supported macOS versions.
Static Library Support
CLBlast explicitly supports static library builds via the BUILD_SHARED_LIBS CMake option:
cmake .. -DBUILD_SHARED_LIBS=OFFThis produces libclblast.a suitable for static linking. For details, please see CLBlast: Building and installing.
Requested Recipe
Given the above discussion, we can create a recipe that should work with:
Package: clblast
Version: 1.6.3
Source-URL: https://github.com/CNugteren/CLBlast/archive/refs/tags/${ver}.tar.gz
Build-System: cmake
Configure: -DBUILD_SHARED_LIBS=OFF -DSAMPLES=OFF -DTUNERS=OFF -DTESTS=OFF -DCLIENTS=OFF
The configure flags disable optional components (samples, tuners, tests, benchmark clients) that aren't needed for the library itself. Let me know if you would like me to send a PR.
References
- Prior discussion on OpenCL headers: Add
opencl-headersrecipe to enable OpenCL backend #83 - CLBlast GitHub: https://github.com/CNugteren/CLBlast
- Bandicoot documentation: https://coot.sourceforge.io/docs.html