oneDNN includes several header files providing C and C++ APIs for the functionality and one or several libraries depending on how oneDNN was built.
File | Desc |
---|---|
include/dnnl.h | C header |
include/dnnl.hpp | C++ header |
include/dnnl_types.h | Auxiliary C header |
include/dnnl_config.h | Auxiliary C header |
include/dnnl_version.h | C header with version information |
File | Desc |
---|---|
lib/libdnnl.so | oneDNN dynamic library |
lib/libdnnl.a | oneDNN static library (if built with DNNL_LIBRARY_TYPE=STATIC ) |
File | Desc |
---|---|
lib/libdnnl.dylib | oneDNN dynamic library |
lib/libdnnl.a | oneDNN static library (if built with DNNL_LIBRARY_TYPE=STATIC ) |
File | Desc |
---|---|
bin\dnnl.dll | oneDNN dynamic library |
lib\dnnl.lib | oneDNN import or full static library (the latter if built with DNNL_LIBRARY_TYPE=STATIC ) |
The examples below assume that oneDNN is installed in the directory defined in the DNNLROOT
environment variable.
LD_LIBRARY_PATH
(Linux) or DYLD_LIBRARY_PATH
(macOS) environment variable or the rpath
mechanism.oneDNN requires the com.apple.security.cs.allow-unsigned-executable-memory entitlement when it is integrated with an application that uses the macOS hardened runtime. This requirement comes from the fact that oneDNN generates executable code on the fly and does not sign it.
It can be enabled in Xcode or passed to codesign
like this:
Example Entitlements.plist
:
To link the application from the command line, set up the LIB
and INCLUDE
environment variables to point to the locations of the oneDNN headers and libraries.
Refer to the Microsoft Visual Studio documentation on linking the application using MSVS solutions.
PATH
environment variable.