NVIDIA Has Someone Working On Nouveau CUDA Support

Written by Michael Larabel in NVIDIA on 6 July 2015 at 11:02 PM EDT. 19 Comments
NVIDIA
The shocker of the day is that aside from an independent (non-NVIDIA) open-source developer working on Nouveau SPIR-V support is that there's an actual NVIDIA employee working towards CUDA compute support atop the open-source Nouveau graphics driver.

Andrew Chew of NVIDIA is working towards CUDA (Compute Unified Device Architecture) support within the open-source NVIDIA driver. Given that CUDA isn't supported across non-NVIDIA drivers and is regarded as a "NVIDIA recipe" and rather proprietary interface, it's to much surprise that a developer is working on enabling support for this OpenCL alternative within Nouveau.

Chew was reaching out to Nouveau developers over ways to support fixed virtual address locations and sparse mappins within the Nouveau driver as a needed step towards supporting CUDA. He explained in a Nouveau mailing list post, "CUDA requires that the GPU virtual address for a given buffer match the CPU virtual address. Therefore, when mapping a CUDA buffer, we have to have a way of specifying a particular virtual address to map to (we would ask that the CPU virtual address be used). Currently, as I understand it, the allocator implemented in nvkm/core/mm.c, used to provision virtual addresses, doesn't allow for this (but it's very easy to modify the allocator slightly to allow for this, which I have done locally in my experiments). In addition, the CUDA use case typically involves allocating a big chunk of address space ahead of time as a way to reserve that chunk for future CUDA use. It then maps individual buffers into that address space as needed. Currently, the virtual address allocation is done during buffer mapping, so in order to support these sparse mappings, it seems to me that the virtual address allocation and buffer mapping need to be decoupled into separate operations."

Chew has proposed two new ioctls for dealing with these current shortcomings of the Nouveau DRM driver. He's currently seeking feedback via this mailing list thread. It will be interesting to see just how interested NVIDIA is in supporting CUDA on this open-source driver and whether their focus is limited to the Tegra SoCs (where they've done a great deal of Nouveau support recently) or also their desktop GeForce/Quadro offerings too. Based on Andrew Chew's past work, it would seem mostly Tegra/mobile focused, but hopefully this work will be able to be carried over into the desktop Nouveau realm for furthering open-source GPGPU support.

Times are certainly interesting.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week