Force a specific backend

Is there a way to do it? Taichi appears to be silently falling back to CPU, although the CUDA backend should work on my system.

Speaking of, I do not believe the CPU fallback is very helpful. I write GPU software when high computational throughput is needed (and because I enjoy it more!). It’s that intention that drove me to Taichi, in particular, as a faster way to prototype algorithms suited to the GPU.

Taichi appears to be silently falling back to CPU, although the CUDA backend should work on my system.

Have you installed CUDA correctly on your machine? Is your GPU NVIDIA’s and driver installed properly? You may want to see more information on this by nvidia-smi.

I do not believe the CPU fallback is very helpful.

If no fallback, it will raise an error when CUDA unavailable, which is also bad too.

It’s that intention that drove me to Taichi, in particular, as a faster way to prototype algorithms suited to the GPU.

Finally, if you can’t make CUDA works for Taichi anyway, let’s try ti.init(arch=ti.opengl), which also allows you to run programs on GPU with OpenGL compute shaders. Tt’s now officially released in v0.6.0, just losing some features like sparse data structures.

1 个赞

Thanks archibate. The OpenGL backend appears to work. Still, I would prefer to play with all features of Taichi, before OpenGL is completely fleshed-out.

CUDA was installed. nvidia-smi appears to have nothing noteworthy:
NVIDIA-SMI 445.87 Driver Version: 445.87 CUDA Version: 11.0

Any other ideas would be appreciated! I’m on the Game-Ready Driver, not Studio Driver, if that makes any difference.