nvblas-sys

Crates.ionvblas-sys
lib.rsnvblas-sys
version0.1.1
sourcesrc
created_at2023-03-09 21:27:07.643134
updated_at2023-03-09 21:44:07.319906
descriptionThis package provides linkage to NVBLAS
homepagehttps://github.com/gfaster/nvblas-sys
repositoryhttps://github.com/gfaster/nvblas-sys.git
max_upload_size
id805925
size7,299
Gavin Rohrer (gfaster)

documentation

https://docs.rs/nvblas-sys/

README

nvblas-sys

This package provides linkage to and configuration for NVBLAS.

Why should you use nvblas-sys

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.

Setup

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.

Commit count: 3

cargo fmt