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.
1wget 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.
1tar -xzvf v3.3.3.tar.gz
- Go to the /path/to/oneDNN-3.3.3 directory.
1cd /path/to/oneDNN-3.3.3
- Adapt to the Arm platform.
1sed '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.
1mkdir build - Go to the build directory.
1cd build
- Create an installation directory.
1mkdir install - Build code with CMake.
1cmake -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 compilation.
1make -j64
The number following j indicates the number of CPU cores. Replace this example number with the actual one.
- Start the installation.
1make install - Check whether the libdnnl.so file exists in the installation directory.
1ll install/lib64/