This way is recommended for prototyping
python example_reduce_jit.py
pip install -e .
python example_reduce.py
The tests use the JIT compile solution
python tests.py
python bench.py
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=<LIBTORCH_PATH> ..
./example_reduce
you might need to reference your cuda library
python save-torch-model.py
cd build
# compile C++ if needed
./use-torch-model ../model.pt