taichi-dev / difftaichi

10 differentiable physical simulators built with Taichi differentiable programming (DiffTaichi, ICLR 2020)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why using GPU is much slower than CPU in this diffmpm.py example?

lgyStoic opened this issue · comments

In my mac m1, using CPU(arm) diffmpm can running in 14FPS, but using GPU(metal) running much slower, only less then 2 FPS, also in 3080(cuda) ,is there any problem this compiler do optimization in IR level?

Also reproduced on my Intel + nvidia GPU workstation.

CPU: i9-11900k
GPU: RTX3080

with ti.cpu: 13 FPS
with ti.cuda: 10 FPS

Script: examples/diffmpm.py