Vpu Pytorch EXtension
Pytorch >= 2.4 required. Cpu version could be downloaded from offical site.
pip3 install torch --index-url https://download.pytorch.org/whl/cpu
- Python 3.8 or later.
- GCC 9.4.0 or newer is required.
- CMake 3.18 or later.
pip3 install cmake
- Optional: Ninja build tool
pip3 install ninja
cd vpex
mkdir build
cd build
export TORCH_INSTALL_PATH=$(python -c "import os;import torch;print(os.path.dirname(os.path.realpath(torch.__file__)))")
cmake -G Ninja -DCMAKE_PREFIX_PATH=${TORCH_INSTALL_PATH}/share/cmake ..
ninja
cd vpex
export PYTHONPATH=$PWD/python
python test/test.py