Closed kristianQh closed 1 year ago
Hi @BachiLi Hope that is fine I am tagging you. I was just wondering what exact versions you recommend in order to make diffvg compile on GPU?
Just wanted to update this issue after spending way too many hours debugging. I was able to successfully install diffvg on a GPU on Windows with some small adjustments and by making a debug build. I also had to hardcode my Anaconda lib directory into the setup file.
Installing diffvg on a GPU on Linux (Manjaro Gnome) was a bit more challenging as pybind11 seemed to run into some trouble. What finally worked for me was deleting the shortcut for calling the caster's cast_op_type
(line 949-952 in diffvg/pybind11/include/pybind11/cast.h
). I have not thoroughly tested the compiled diffvg package, but running the example app single_circle.py
works and uses my GPU.
Running the installation steps on Manjaro Gnome with cuda 11.8, pytorch 12.1 only using CPU runs flawlessly. However, whenever I enable GPU (GTX 1070 Ti) compiling the setup.py installation stops at:
[ 28%] Building NVCC (Device) object CMakeFiles/diffvg.dir/diffvg_generated_diffvg.cpp.o
Here I among other errors receive the following;
I also tried to create a small CMakeList.txt using CUDA on a small kernel example which worked correctly so I assume my CUDA is correctly setup. (Pytorch of course also recognises my GPU).