要先依照 linux-npu-driver 說明,自己 build driver. so 然後 install
因為後來 run 測試程式需要 build compiler with driver. 所以依照後面那個 "Building a driver together with the compiler" 說明比較好。
我有checckout v1.13.0 然後:
cd linux-npu-driver git submodule update --init --recursive cmake -B build -S . -DENABLE_NPU_COMPILER_BUILD=ON cmake --build build --parallel $(nproc) # install the driver in the system sudo cmake --install build --prefix /usr # reload the intel_vpu module to load new firmware sudo rmmod intel_vpu sudo modprobe intel_vpu這樣就會 build NPU plugin 和 OpenVINO runtime
記得要把自己加到 render group.
最後 的 driver test,要在 linux-npu-driver 下做這些:
# Prepare the add_abc model in path pointed by basic.yaml mkdir -p models/add_abc curl -o models/add_abc/add_abc.xml https://raw.githubusercontent.com/openvinotoolkit/openvino/master/src/core/tests/models/ir/add_abc.xml touch models/add_abc/add_abc.bin # Run tests with add_abc.xml npu-umd-test --config=validation/umd-test/configs/basic.yaml才 run 得起來。
另外用 gpu 跑 ollama 的可能參考:
沒有留言:
張貼留言