DLPrimitives Blog
Development Blog
Pytorch OpenCL backend - simplified
10/27/22, by artyom ;
Posted in:
Releases;
0 comments
Now installation of opencl backend for pytorch is really simple.
- Install nighly version of pytorch for CPU in virtual environment
- Clone
dlrpim_backend
repository and checkouttrue_out_of_tree_support
branch - Update submodules
Run few commands inside repo
mkdir build cd build cmake -DCMAKE_PREFIX_PATH=$VIRTUAL_ENV/lib/python3.8/site-packages/torch/share/cmake/Torch .. make cd ..
Run mnist training:
python mnist.py --device=ocl:0
That's it.
Keep updated
Add Comment:
You must enable JavaScript in order to post comments.