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. NVIDIA GeForce GTX 970 Offers Great Linux Performance
  2. CompuLab Intense-PC2: An Excellent, Fanless, Mini PC Powered By Intel's i7 Haswell
  3. From The Atom 330 To Haswell ULT: Intel Linux Performance Benchmarks
  4. AMD Radeon R9 285 Tonga Performance On Linux
Latest Linux Articles
  1. Ubuntu 14.10 XMir System Compositor Benchmarks
  2. Btrfs RAID HDD Testing On Ubuntu Linux 14.10
  3. Ubuntu 14.10 Linux 32-bit vs. 64-bit Performance
  4. AMD Moves Forward With Unified Linux Driver Strategy, New Kernel Driver
Latest Linux News
  1. What Linux Benchmarks Would You Like To See Next?
  2. Open-Source, Linux Support For Corsair Link Devices Slowly Materializing
  3. Cairo-Dock 3.4 Shows A Lot Of Progress, Works Toward EGL/Wayland Support
  4. Mesa 10.4 Tentatively Planned For Early December
  5. SteamOS Update 145 Brings Compositor, Update Fixes
  6. GStreamer 2014 Conference Videos Posted: Wayland, HTML5, 3D
  7. Nouveau Now Supports DRI3 Without GLAMOR
  8. Features Of The Linux 3.18 Kernel
  9. Debian Now Defaults To Xfce On Non-x86 Desktops
  10. Phoenix Is Trying To Be An Open Version Of Apple's Swift
Latest Forum Discussions
  1. Linux hacker compares Solaris kernel code:
  2. HOPE: The Ease Of Python With The Speed Of C++
  3. Users/Developers Threatening Fork Of Debian GNU/Linux
  4. Ubuntu 16.04 Might Be The Distribution's Last 32-Bit Release
  5. AMD Releases UVD Video Decode Support For R600 GPUs
  6. Proof that strlcpy is un-needed
  7. xbox one tv tuner
  8. Bye bye BSD, Hello Linux: A Sys Admin's Story