| Crates.io | rstsr-aocl-ffi |
| lib.rs | rstsr-aocl-ffi |
| version | 0.2.0 |
| created_at | 2025-07-30 06:36:26.359777+00 |
| updated_at | 2025-08-26 14:39:38.464938+00 |
| description | Intel AMD Optimizing CPU Libraries FFI bindings |
| homepage | |
| repository | https://github.com/RESTGroup/rstsr-ffi |
| max_upload_size | |
| id | 1773177 |
| size | 24,329,608 |
This crate contains AOCL (AMD Optimizing CPU Libraries) FFI bindings.
Current FFI version is AOCL 5.1, where codes are available in github organization amd. If you are using an older version of AOCL, this crate should still work if you do not explicitly call the function that only occurs in higher version of BLIS.
Feature Not Complete: AOCL is a large collection of math functions. This crate currently only have following bindgens:
- blis (for blas, cblas utilities)
- flame (for cblas, lapack, lapacke utilities)
We surely want to perform more bindgens (such as fftw, etc.) in future; but these are not of priority for project REST and RSTSR. If you wish to put these bindgens in this crate, currently you can file an issue, and we will quickly realize the bindgen of other features in AOCL.
This crate is not official bindgen project. It is originally intended to serve rust tensor toolkit RSTSR and rust electronic structure toolkit REST.
dynamic_loading.This crate supports dynamic loading.
If you want to use dynamic loading, please enable cargo feature dynamic_loading when cargo build.
The dynamic loading will try to find proper library when your program initializes.
LD_LIBRARY_PATH (Linux) DYLD_LIBRARY_PATH (Mac OS), PATH (Windows).RSTSR_DYLOAD_AOCL_BLIS, RSTSR_DYLOAD_AOCL_FLAME to the dynamic library path.NOTE: When you call BLAS and LAPACK functions with dynamic loading, please DO NOT USE other crates (such as rstsr_lapack_ffi). Please make sure you are only using rstsr_aocl_ffi::blis, rstsr_aocl_ffi::flame. Sticking to using rstsr_aocl_ffi will make sure you are calling BLAS and LAPACK functions from AOCL, instead of other BLAS vendors.
If you encountered large compile time or disk consumption, you may consider add these lines in your Cargo.toml:
[profile.dev.package.rstsr-aocl-ffi]
opt-level = 0
debug = false
Default features:
blis: Include BLIS bindgens.flame: Include LAPACK bindgens.Optional features:
dynamic_loading: Supports dynamic loading.ilp64: Use int64_t for dimension specification, or lapack error code types if this feature specified. Otherwise, use int32_t.
blas, error code is returned by c_int; in module cblas, BLIS utility functions use c_int for input or output.header: Header files copied (or renamed) from original source.scripts: Script to generate FFI bindgens.ffi_base.rs: Basic type, enum, struct definitions.ffi_extern.rs: Unsafe extern "C" bindgen functions. Only activated when not dynamic loading.dyload_struct.rs: Struct Lib for dynamic loading.dyload_initializer.rs: The initialization function of Lib for dynamic loading.dyload_compatible.rs: Unsafe bindgen function that is compatible to that of ffi_extern.rs. Only activated when dynamic loading.cblas::ffi_base: the enums CBLAS_TRANSPOSE, CBLAS_UPLO, etc comes from crate rstsr_lapack_ffi for convenience. This crate depends on rstsr_lapack_ffi for those definitions of enums.v0.2.0
dynamic_loading is not default.v0.1.1