Expand description
§oneDNN-src
This crate provides the source build of oneAPI Deep Neural Network Library (oneDNN) for Rust projects.
§Usage
Add this crate to your Cargo.toml:
[dependencies]
onednn-src = "0.1.3"Then, add the extern declaration to your main.rs or lib.rs to ensure the libraries are properly linked:
extern crate onednn_src;This crate exports the following environment variables for locating the oneDNN library in your build scripts:
DEP_DNNL_ROOT: Points to the root directory containing the compiled oneDNN library and all its files,DEP_DNNL_INCLUDE_PATH: Points to the directory containing oneDNN header files needed for compilation,DEP_DNNL_LIBRARY_PATH: Points to the directory containing the compiled oneDNN static libraries.
§Features
graph: Enables the graph component.training: Enables training functionality.inference: Enables inference functionality.experimental: Enables experimental featuresverbose: Enables verbose mode
By default, the training feature is enabled.
The training and inference features are mutually exclusive.
If neither is specified, training will be used.
§Rust Compatibility
- Edition: Rust 2021
- MSRV: 1.77 (Minimum Supported Rust Version)
§License
This crate itself is licensed under the MIT License. See the LICENSE file.
oneDNN (which this crate builds and links to) is licensed under the Apache License, Version 2.0. If you redistribute binaries or source that include oneDNN, you must comply with the Apache-2.0 terms, including preserving license and notice files. For details, see oneDNN’s upstream LICENSE/NOTICE.
The published crate may build and/or redistribute artifacts originating from the following third-party projects. Each component remains under its own license, which applies in addition to this crate’s MIT license. When redistributing your software, ensure that you include the required attributions and license texts for any components that were used by your build configuration and target platform. The exact set of components used can depend on enabled features, target architecture, and toolchain.
The published crate also includes the following libraries:
3-clause BSD license:
2-clause BSD license:
Apache License Version 2.0:
Boost Software License, Version 1.0:
MIT License:
- Intel Graphics Compute Runtime for oneAPI Level Zero and OpenCL Driver
- Intel Graphics Compiler
- oneAPI Level Zero
- Doxyrest
- Intel Metrics Discovery Application Programming Interface
- spdlog
- sphinx-copybutton
Notes:
- Redistribution guidance: If you distribute binaries produced with this crate, include the applicable third-party licenses and notices (e.g., Apache-2.0 NOTICE for oneDNN and attribution for BSD/Boost/MIT components).
- Features you enable (e.g., graph/training/inference/experimental/verbose) may influence which third-party components are compiled and thus which licenses apply to your distribution.
- This summary is provided for convenience and does not constitute legal advice. Please review the full license texts of each component.