Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling the Source Code

Compile and install ONNX Runtime after the patch file is applied.

  1. Set environment variables.
    export ONNX_INTRA_NUM=6 
    export ONNX_INTER_NUM=6 
    export LD_LIBRARY_PATH=/usr/local/sra_inference/lib/neon/:$LD_LIBRARY_PATH 
    • ONNX_INTRA_NUM: intra-operator parallel thread count, controlling thread parallelism within an operator
    • ONNX_INTER_NUM: inter-operator parallel thread count, controlling concurrent execution across multiple operators

    The thread count can be set as required.

  2. Go to the /path/to/ONNX_Runtime directory.
    1
    cd /path/to/ONNX_Runtime/onnxruntime-1.19.2
    
  3. Compile the ONNX Runtime and create the build directory.
    ./build.sh --config RelWithDebInfo --build_shared_lib --parallel --compile_no_warning_as_error --skip_submodule_sync --cmake_extra_defines CMAKE_OSX_ARCHITECTURES=arm64 --allow_running_as_root --skip-keras-test --skip_onnx_tests --skip_tests --build_dir build

    If the following information is displayed, the compilation is successful.