我要评分
获取效率
正确性
完整性
易理解

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.

  1. Obtain the oneDNN source code.
    1. Download the oneDNN source code.

      https://github.com/oneapi-src/oneDNN/archive/refs/tags/v3.3.3.tar.gz

    2. 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
  2. Decompress the oneDNN source package.
    tar -xzvf v3.3.3.tar.gz
  3. Go to the /path/to/oneDNN-3.3.3 directory.
    cd /path/to/oneDNN-3.3.3
  4. 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
  5. Create a build directory.
    mkdir build
  6. Go to the build directory.
    cd build
  7. Create an installation directory.
    mkdir install
  8. 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.

  9. Perform the compilation.
    make -j64

    The number following j indicates the number of CPU cores. Replace this example number with the actual one.

  10. Perform the installation.
    make install
  11. Check whether the libdnnl.so file exists in the installation directory.
    ll install/lib64/