Skip to content
Randall O'Reilly edited this page Jan 12, 2021 · 2 revisions

Most GPU computation uses NVIDIA's CUDA framework. However, this is not ideal for a number of reasons:

  • Only runs on NVIDIA hardware -- Mac laptops for example do not use NVIDIA anymore, and for local development and testing, it is ideal to be able to run on the laptop. Or even the phone in the future.
  • Closed source.
  • C-based -- integration with Go is not ideal.

Probably the best way forward is to use Vulkan, which is open source, universally-supported, and has (low level) compute capabilities built in. There are some recent reports that it is becoming competitive performance-wise with CUDA. There was also OpenCL, but Apple has abandoned it, and it is widely regarded as dying.

The problem with Vulkan is that it is very low-level, "close to the metal", so it can be highly verbose to just get anything at all working. Thus, various forms of infrastructure are emerging that provide a more high-level interface on top of Vulkan. Of course, most of these are in C, but they provide a good place to start for a Go version.

I will probably add a Vulkan rendering system in GoGi (started on it originally before switching to OpenGL), and with that experience, should be able to make a good compute infrastructure.