Nouveau/NVK driver

Hi!

Since modular is all about doing without CUDA, are there any plans to support the free Nouveau and/or NVK drivers?

1 Like

Hi Gonsolo,

We haven’t announced official plans before NVIDIA/AMD - we’re taking things one step at a time and have some work to do before officially announcing even this. If you’d like more color on that, please check out the community meeting from Thursday,

-Chris

Thanks. Yes, I saw that meeting.

I was just referring to the following from the documentation: “*MAX Requires the NVIDIA hardware driver for GPU access.” Since you only need access to the hardware, running Mojo kernels on the GPU with nouveau/nvk seemed to be not a big deal. But I’ll wait patiently. :slight_smile:

Ok sorry, I wasn’t familiar with nouveau/nvk - we don’t have any current integration for Vulcan at the moment.

Sorry about being unclear.
I’m not talking about Vulkan (ok, NVK is the Vulkan driver). I’m asking about using the free Nouveau driver (kernel + user space) as a replacement for basic GPU access instead of the proprietary nvidia.ko driver.

Running “magic run vector_addition” fails with “This example requires a supported GPU”.

From my understanding it should be relatively easy to relax the check for NVIDIA GPU’s a bit to not require nvidia.ko but also accept nouveau.ko.

But again: Waiting patiently. :slight_smile:

@gonsolo Nouveau doesn’t have the ability to run CUDA code, it essentially exists for either FOSS purists or for people to have display out for long enough to get the normal drivers installed. It’s also not really compatible with any of the GPUs that function with MAX, and the Nvidia Open Kernel Driver exists as a replacement. MAX does actually use the “talk to the GPU” parts of CUDA, which is a userspace driver, but avoids the libraries above that, which Nvidia also calls CUDA. As such, this would actually be very difficult to add. Nvidia’s Open kernel driver works with MAX, in fact it’s the only kernel driver Nvidia supports on Blackwell, but you still need the closed userspace.

Nova, is an effort to provide a GPU driver for Nvidia which is both fully FOSS and integrates properly with MESA, would be the in-kernel driver to pay attention to, since it’s going to make use of the GSP firmware blobs to have many of the capabilities of the normal one, with the exception of not supporting CUDA.

Being able to talk to Mesa would be a very nice fallback path since, to my knowledge, every “GPU-like” device on Linux except for Nvidia’s closed drivers uses it. Integrating with that for Vulkan would provide some “it functions” capabilities to MAX. However, that is going to be a ways off since Vulkan compute is not the highest performance path for most of the common devices.

Ok, thanks.