Skip to content

Latest commit

 

History

History
44 lines (39 loc) · 1.02 KB

README.md

File metadata and controls

44 lines (39 loc) · 1.02 KB

VPEX

Vpu Pytorch EXtension

Install Pytorch

Pytorch >= 2.4 required. Cpu version could be downloaded from offical site.

pip3 install torch --index-url https://download.pytorch.org/whl/cpu

Dependencies

  • 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

Build

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

Test

cd vpex
export PYTHONPATH=$PWD/python
python test/test.py

Reference