BachiLi / diffvg

Differentiable Vector Graphics Rasterization
https://people.csail.mit.edu/tzumao/diffvg/
Apache License 2.0
964 stars 159 forks source link

Rendering: cpu vs gpu #21

Open ivanpuhachov opened 3 years ago

ivanpuhachov commented 3 years ago

In your generative_models/rendering.py you have force_cpu=True, but it works fine with all tensors on GPU (after little tweaks like cuda() insted of cpu() here and there). However, it does not give any performance boost (mnist epoch still takes 15 minutes on my machine). Why is that? Am I missing something?

Cheers, Ivan

flono commented 2 years ago

I would also be interested in the GPU vs CPU discussion. Installing with CUDA and PyTorch did not really change performance for me. It does not even show the GPU being used in the activity monitor, but PyTorch insists that the tensors are on the GPU.

LazoYoung commented 1 week ago

For me testing painterly_rendering.py, running on CPU is roughly 10x faster than CUDA with RTX 3060 Ti 8GB. I wonder if anyone can reproduce it or if it's just me getting the awkward result.