DLPrimitives Blog
Development Blog
Pytorch OpenCL backend - simplified
10/27/22, by artyom ;
Posted in:
Releases;
2 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
Comments
s/dlrpim/dlprim/g
Hi.
This all seems encouraging, but it might as well be in Chinese to me. I have some experience with Linux. My daily driver desktop is a Linux box running Ubuntu 22.04, with an AMD CPU and an AMD graphics card. This choice for me was less Linux for Linux's sake and more getting away from the Windows world's ever-increasing "telemetry" that can't be turned off and silently reinstalls itself immediately and tuns itself back on without telling you if you try. The hardware was chosen on price/performance, plus a desire not to support Intel and nVidia and their heavy-handed monopoly tactics.
I have never attempted to compile a custom kernel. I turn it on, I put in my login credentials, I log into a Gnome desktop, I read stuff on the Internet and send and receive my emails. I have not the faintest idea what a "makefile" is and attempting to look it up and figure it out just leaves me frustrated and confused. All of this might as well be in Sanskrit.
I am trying Stable Diffusion and I want to get it to run using the GPU, instead of taking almost an hour to grind out every batch of images with CPU only. Is there a script I can run that will install this? If I have to write my own GPU drivers in Assembly, if I have to write my own custom Linux kernel from scratch, no thank you. There is a reason I'm using Ubuntu instead of Arch or Gentoo. But if there's an installation script that "just werks," I'm all ears. Thanks.
Add Comment:
You must enable JavaScript in order to post comments.