Crates.io | nvblas-sys |
lib.rs | nvblas-sys |
version | 0.1.1 |
source | src |
created_at | 2023-03-09 21:27:07.643134 |
updated_at | 2023-03-09 21:44:07.319906 |
description | This package provides linkage to NVBLAS |
homepage | https://github.com/gfaster/nvblas-sys |
repository | https://github.com/gfaster/nvblas-sys.git |
max_upload_size | |
id | 805925 |
size | 7,299 |
This package provides linkage to and configuration for NVBLAS.
It's easy to link to a system library, especially when another package provides
bindings. However, anyone who includes your package down the line will be unable
to override it. Using nvblas-sys means exactly one package will link to
libnvblas
and those who wish to override it can do so without causing problems
for dependents thanks to the use of the links
manifest tag.
Before anything else, NVBLAS must be installed and exist in cargo
search path. On Linux machines, it should be named libnvblas.so
. If it is
necessary to override the linkage, it can be overridden on a per-machine or
per-crate basis by using a config.toml
file.
Make sure to invoke the crate to make sure it runs:
extern crate nvblas-sys;
nvblas-sys comes with a default configuration file, but it may not be may not be
acceptable for your usage. To use your own configuration file, include the
following line in your build.rs
file:
println!("cargo:rustc-env=NVBLAS_CONFIG_FILE={}/nvblas.conf",
env::var("CARGO_MANIFEST_DIR").unwrap());
Alternatively, you can set the environment variable NVBLAS_CONFIG_FILE
manually.
Since NVBLAS is a limited drop-in replacement to traditional CPU BLAS
implementations, nvblas-sys does not provide any declarations; you will also
need to include blas-sys
as a dependency.