ARM64平台构建OpenVINO
发布时间:2025-09-22 17:42:26.802 文章来源:AiSoftCloud 浏览次数:63 下载次数:1 

x86系统安装openvino

  1. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  2. sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  3. echo "deb https://apt.repos.intel.com/openvino ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino.list
  4. sudo apt update
  5. apt-cache search openvino
  6. sudo apt install openvino-2025.1.0

Arm系统构建openvino

Arm系统官方不支持直接安装openvino,需要手动构建:

  1. export GIT_LFS_SKIP_SMUDGE=1
  2. git clone https://gitee.com/openvinotoolkit-prc/openvino.git
  3. cd openvino
  4. git checkout 2025.1.0

修改.gitmodule:

  1. [submodule "src/plugins/intel_cpu/thirdparty/onednn"]
  2. path = src/plugins/intel_cpu/thirdparty/onednn
  3. #url = https://github.com/openvinotoolkit/oneDNN.git
  4. url = https://gitee.com/openvinotoolkit-prc/oneDNN.git
  5. ignore = dirty
  6. [submodule "thirdparty/xbyak"]
  7. path = thirdparty/xbyak
  8. #url = https://github.com/herumi/xbyak.git
  9. url = https://gitee.com/Vizl/xbyak.git
  10. ignore = dirty
  11. [submodule "thirdparty/zlib/zlib"]
  12. path = thirdparty/zlib/zlib
  13. url = https://github.com/madler/zlib.git
  14. #url = https://gitee.com/wu_baihui/zlib.git
  15. ignore = dirty
  16. [submodule "thirdparty/pugixml"]
  17. path = thirdparty/pugixml
  18. #url = https://github.com/zeux/pugixml.git
  19. url = https://gitee.com/Vizl/pugixml.git
  20. ignore = dirty
  21. [submodule "thirdparty/gflags/gflags"]
  22. path = thirdparty/gflags/gflags
  23. #url = https://github.com/gflags/gflags.git
  24. url = https://gitee.com/minhanghuang/gflags.git
  25. ignore = dirty
  26. [submodule "thirdparty/gtest/gtest"]
  27. path = thirdparty/gtest/gtest
  28. url = https://github.com/openvinotoolkit/googletest.git
  29. #url = https://gitee.com/Vizl/googletest.git
  30. #url = https://gitee.com/pandeng2079/googletest.git
  31. ignore = dirty
  32. [submodule "thirdparty/ocl/icd_loader"]
  33. path = thirdparty/ocl/icd_loader
  34. #url = https://github.com/KhronosGroup/OpenCL-ICD-Loader.git
  35. url = https://gitee.com/mirrors_KhronosGroup/OpenCL-ICD-Loader.git
  36. ignore = dirty
  37. [submodule "thirdparty/ocl/cl_headers"]
  38. path = thirdparty/ocl/cl_headers
  39. #url = https://github.com/KhronosGroup/OpenCL-Headers.git
  40. url = https://gitee.com/mirrors_GerHobbelt/OpenCL-Headers.git
  41. ignore = dirty
  42. [submodule "thirdparty/ocl/clhpp_headers"]
  43. path = thirdparty/ocl/clhpp_headers
  44. #url = https://github.com/KhronosGroup/OpenCL-CLHPP.git
  45. url = https://gitee.com/mirrors_GerHobbelt/OpenCL-CLHPP.git
  46. ignore = dirty
  47. [submodule "thirdparty/onnx"]
  48. path = thirdparty/onnx/onnx
  49. #url = https://github.com/onnx/onnx.git
  50. url = https://gitee.com/shtoutman/onnx.git
  51. [submodule "thirdparty/protobuf"]
  52. path = thirdparty/protobuf/protobuf
  53. #url = https://github.com/protocolbuffers/protobuf.git
  54. url = https://gitee.com/shtoutman/protobuf.git
  55. [submodule "src/bindings/python/thirdparty/pybind11"]
  56. path = src/bindings/python/thirdparty/pybind11
  57. #url = https://github.com/pybind/pybind11.git
  58. #url = https://gitee.com/yunfeiliu/pybind11.git
  59. url = https://gitee.com/miao123456miao/pybind11.git
  60. [submodule "thirdparty/ittapi/ittapi"]
  61. path = thirdparty/ittapi/ittapi
  62. #url = https://github.com/intel/ittapi.git
  63. url = https://gitee.com/Vizl/ittapi.git
  64. [submodule "ncc"]
  65. path = cmake/developer_package/ncc_naming_style/ncc
  66. #url = https://github.com/nithinn/ncc.git
  67. url = https://gitee.com/Vizl/ncc.git
  68. [submodule "thirdparty/onednn_gpu"]
  69. path = src/plugins/intel_gpu/thirdparty/onednn_gpu
  70. #url = https://github.com/oneapi-src/oneDNN.git
  71. #url = https://gitee.com/openvinotoolkit-prc/oneDNN.git
  72. #url = https://gitee.com/cumt/onednn_gpu.git
  73. url = https://gitee.com/Vizl/oneDNN_GPU.git
  74. [submodule "thirdparty/json/nlohmann_json"]
  75. path = thirdparty/json/nlohmann_json
  76. #url = https://github.com/nlohmann/json.git
  77. url = https://gitee.com/shtoutman/json.git
  78. shallow = true
  79. [submodule "thirdparty/flatbuffers/flatbuffers"]
  80. path = thirdparty/flatbuffers/flatbuffers
  81. #url = https://github.com/google/flatbuffers.git
  82. url = https://gitee.com/shtoutman/flatbuffers.git
  83. [submodule "thirdparty/snappy"]
  84. path = thirdparty/snappy
  85. #url = https://github.com/google/snappy.git
  86. url = https://gitee.com/Vizl/snappy.git
  87. [submodule "ARMComputeLibrary"]
  88. path = src/plugins/intel_cpu/thirdparty/ComputeLibrary
  89. #url = https://github.com/ARM-software/ComputeLibrary.git
  90. url = https://gitee.com/Vizl/armcompute-library.git
  91. ignore = dirty
  92. [submodule "src/plugins/intel_cpu/thirdparty/mlas"]
  93. path = src/plugins/intel_cpu/thirdparty/mlas
  94. #url = https://github.com/openvinotoolkit/mlas.git
  95. url = https://gitee.com/Vizl/mlas.git
  96. [submodule "thirdparty/level_zero/level-zero"]
  97. path = thirdparty/level_zero/level-zero
  98. #url = https://github.com/oneapi-src/level-zero.git
  99. url = https://gitee.com/Vizl/level-zero.git
  100. [submodule "src/plugins/intel_npu/thirdparty/level-zero-ext"]
  101. path = src/plugins/intel_npu/thirdparty/level-zero-ext
  102. #url = https://github.com/intel/level-zero-npu-extensions.git
  103. url = https://gitee.com/Vizl/level-zero-npu-extensions.git
  104. [submodule "src/plugins/intel_npu/thirdparty/yaml-cpp"]
  105. path = src/plugins/intel_npu/thirdparty/yaml-cpp
  106. #url = https://github.com/jbeder/yaml-cpp.git
  107. url = https://gitee.com/Vizl/yaml-cpp.git
  108. [submodule "thirdparty/telemetry"]
  109. path = thirdparty/telemetry
  110. #url = https://github.com/openvinotoolkit/telemetry.git
  111. url = https://gitee.com/Vizl/telemetry.git
  112. [submodule "src/plugins/intel_cpu/thirdparty/libxsmm"]
  113. path = src/plugins/intel_cpu/thirdparty/libxsmm
  114. #url = https://github.com/libxsmm/libxsmm.git
  115. url = https://gitee.com/Vizl/libxsmm.git
  116. [submodule "src/plugins/intel_cpu/thirdparty/shl"]
  117. path = src/plugins/intel_cpu/thirdparty/shl
  118. #url = https://github.com/openvinotoolkit/shl.git
  119. url = https://gitee.com/Vizl/shl.git
  120. [submodule "src/plugins/intel_cpu/thirdparty/kleidiai"]
  121. path = src/plugins/intel_cpu/thirdparty/kleidiai
  122. #url = https://github.com/ARM-software/kleidiai.git
  123. url = https://gitee.com/mirrors_ARM-software/kleidiai.git
  124. [submodule "src/plugins/intel_cpu/thirdparty/xbyak_riscv"]
  125. path = src/plugins/intel_cpu/thirdparty/xbyak_riscv
  126. url = https://github.com/herumi/xbyak_riscv.git

然后运行:

  1. git submodule sync
  2. git submodule update --init --recursive

安装依赖

  1. sudo apt install -y build-essential cmake git python3 python3-pip
  2. sudo apt install -y libpython3-dev libboost-all-dev libgtk2.0-dev pkg-config \
  3. libavcodec-dev libavformat-dev libswscale-dev \
  4. libpng-dev libjpeg-dev libtiff-dev libopenblas-dev
  5. sudo apt install -y scons
  6. pip3 install numpy cython

编译

  1. mkdir build && cd build
  2. cmake -DCMAKE_BUILD_TYPE=Release \
  3. -DENABLE_PYTHON=ON \
  4. -DPYTHON_EXECUTABLE=$(which python3) \
  5. -DENABLE_CPPLINT=OFF \
  6. -DENABLE_NVIDIA=ON \
  7. -DENABLE_CUDA=ON \
  8. -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda \
  9. -DNVIDIA_GPU_ARCHS=87 \
  10. -DENABLE_TESTS=OFF \
  11. -DCMAKE_INSTALL_PREFIX=/opt/openvino \
  12. ..
  13. make -j4
  14. sudo make install
更多文章可关注公众号
aisoftcloud