1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

Gdev: A Competitive Open-Source CUDA Implementation

NVIDIA

Published on 29 March 2012 10:02 PM EDT
Written by Michael Larabel in NVIDIA
6 Comments

Shinpei Kato, the developer that last year at XDC2011 Chicago presented TimeGraph as an open-source GPU Linux command scheduler and PathScale's GPGPU run-time, has something new to share. Shinpei's latest project is Gdev, which comes down to being an open-source CUDA implementation that's competitive to NVIDIA's proprietary stack.

From an email that Kato wrote me a few days back, "My research project has developed a fully open-source set of the device driver and runtime library for CUDA. We still need an NVIDIA's compiler (nvcc) to compile programs (Gallium3D is not yet ready for CUDA/OpenCL), but nothing else is required. In fact, NVIDIA has released an open-source compiler, hence all pieces of CUDA software stack are now open-source!"

He's published Gdev onto GitHub and will be presenting this project at USENIX ATC 2012. He additionally shares with us, "There are many nice features included in the project. For instance, you can run CUDA programs in the operating system directly, and enhance the performance of file encryption and RAID5/6 parity encoding/decoding. You can also virtualize one GPU into several, so the time-sharing server can now install the GPU for multiple users. POSIX-based IPC (shared memory) is also enabled for multiple GPU contexts, which eliminates the overhead of moving data between the host and device back and forth. We have lots of extensions planed also, but they will come to appear with other academic publications later in this year."

Here's some other details he shared on his Gdev project:

- Gdev is composed of the kernel module and several runtime libraries (low-level Gdev runtime and high-level CUDA runtime).

- Gdev is independent of the device driver - it is a first-class GPU resource management component.

- Gdev is available with both the Nouveau and PSCNV open-source drivers.

- Gdev has two versions of runtime. One runs in the Linux kernel, while the other runs in user-space. This means that exactly the same CUDA program can run both in the Linux kernel and user-space! To be specific, Gdev contains "kcuda.ko", which is a kernel module that exports CUDA API functions to the Linux kernel. This runtime-unified OS approach is one of the notable features of Gdev.

- Since Gdev can have GPGPU runtime in the Linux kernel, it can prevent user-space programs from managing GPU resources directly by poking ioctl() commands. Under Gdev, GPU resource usage can be enforced by the Linux kernel - hence more dependable/secure.

- The absolute performance of Gdev is competitive to NVIDIA's proprietary software.

- Gdev provides some extensions to CUDA. A notable extension is shared device memory support, i.e., it provides an additional set of CUDA Driver API, cuShmGet(), cuShmAt(), cuShmDt(), and cuShmCtl(), which play a similar role to POSIX shmget(), shmat(), shmdt(), and shmctl(). This shared memory functionality would be very powerful in multi-tasking environments.

- Gdev also supports direct data transfer between an I/O device and the GPU. An additional set of CUDA Driver API, cuMemMap() and cuMemUnmap(), can map and unmap the device memory to and from the user buffer, and cuMemGetPhysAddr() tells the physical bus address directly accessible to the I/O device. All the I/O device has to do is to set up its DMA engine or so to send data to the obtained bus address. Then the data is directly transferred to the device memory.

- Gdev can virtualize the GPU into multiple instances. If some user group wants the GPU to be isolated from other user groups, the virtualized GPU is very useful.

- Gdev has lots of additional fancy scheduling and memory management techniques. Interested users are encouraged to read the Gdev paper, which will appear at USENIX ATC 2012.

- Gdev does not fully support CUDA yet. It doesn't support OpenCL also. But most Rodinia CUDA benchmark programs can run on top of Gdev with its limited set of CUDA functions. We plan to add more support for CUDA and OpenCL anyway.

- Gdev provides abstracted context objects, memory objects, address space objects, etc. for the GPU. This means that Gdev could be ported to other GPU architectures. In fact, code is nicely separate for architecture-dependent and independent parts. Porting Gdev to Nouveau, for instance, needed only about 400 lines of code.

- This open-source implementation of Gdev will particularly facilitate research on GPGPU!

This open-source project sounds extremely interesting and I look forward to seeing its progression and hopeful adoption. Other information can be learned from its GitHub.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Even With Re-Clocking, Nouveau Remains Behind NVIDIA's Proprietary Linux Driver
  2. The Power Consumption & Efficiency Of Open-Source GPU Drivers
  3. AMD R600g/RadeonSI Performance On Linux 3.16 With Mesa 10.3-devel
  4. Intel Pentium G3258 On Linux
Latest Linux Articles
  1. AMD Catalyst 14.6 Does Slightly Better With APITest OpenGL Tests
  2. Updated Source Engine Benchmarks On The Latest AMD/NVIDIA Linux Drivers
  3. Nouveau vs. Radeon vs. Intel Tests On Linux 3.16, Mesa 10.3-devel
  4. KVM Benchmarks On Ubuntu 14.10
Latest Linux News
  1. Fedora Assembles A Security Team
  2. AMD Launches The A10-7800, The 65 Watt Kaveri
  3. Builder: A New Development IDE Being Built For GNOME
  4. GDB 7.8 Betters Python Scripting, Adds Guile Support
  5. GNOME's GTK+ Is Still Striving For A Scene Graph, Canvas API
  6. Unreal Tournament Looks Great For Team Deathmatch
  7. LibreOffice 4.3 Released With Many Exciting Changes
  8. GNOME/GTK On Wayland Gains Focus At GUADEC
  9. GNOME Stakeholders Take Issue With Groupon Over their Gnome
  10. GStreamer VA-API Plug-In Update Adds New Features
Latest Forum Discussions
  1. Debian + radeonsi
  2. Grand Theft Auto Running On Direct3D Natively On Linux Shows Gallium3D Potential
  3. AMD Publishes Open-Source Linux HSA Kernel Driver
  4. Linus Torvalds On GCC 4.9: Pure & Utter Crap
  5. Open-source drivers on ATI R7 260X
  6. AMD Athlon 5350 APU On Linux
  7. Updated and Optimized Ubuntu Free Graphics Drivers
  8. List of Linux friendly Kickstarter projects