r-barnes / pytorch_cmake_example

MIT License
26 stars 5 forks source link

Demonstration of using PyTorch with cmake

To compile:

cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_PREFIX_PATH=`python -c 'import torch;print(torch.utils.cmake_prefix_path)'` -GNinja ..

To run:

./test.py