Basic Installation
The basic installation procedure of oneDNN includes obtaining the source code, running the Arm platform code adaptation command, building code with CMake, and compiling and installing oneDNN. Replace the example paths provided in the following procedure with the actual ones.
Replace /path/to/oneDNN-3.3.3 with the actual path.
- Obtain the oneDNN source code.
- Download the oneDNN source code.
https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.3.3.tar.gz
- Use an SFTP tool to upload the source package to the server.
If the server is connected to the Internet, you can run the wget command on the server to download the source package.
wget https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.3.3.tar.gz --no-check-certificate
- Download the oneDNN source code.
- Decompress the oneDNN source package.
tar -xzvf v3.3.3.tar.gz
- Go to the /path/to/oneDNN-3.3.3 directory.
cd /path/to/oneDNN-3.3.3
- Adapt to the Arm platform.
sed '2441s/.*/'"$(sed -n 2439p tests/gtests/graph/unit/backend/dnnl/test_conv.cpp)"'/' -i tests/gtests/graph/unit/backend/dnnl/test_conv.cpp
- Create a build directory.
mkdir build
- Go to the build directory.
cd build
- Create an installation directory.
mkdir install
- Build code with CMake.
cmake -DCMAKE_INSTALL_PREFIX=/path/to/oneDNN-3.3.3/build/install/ ..
CMAKE_INSTALL_PREFIX specifies the oneDNN installation path. If this parameter is not specified, oneDNN is installed in the default path.
- Perform the compilation.
make -j64
The number following j indicates the number of CPU cores. Replace this example number with the actual one.
- Perform the installation.
make install
- Check whether the libdnnl.so file exists in the installation directory.
ll install/lib64/
