Skip to content

Add clblast recipe for OpenCL BLAS support #84

@coatless

Description

@coatless

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

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=OFF

This 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions