Showing posts with label GPGPU. Show all posts
Showing posts with label GPGPU. Show all posts

Monday, November 1, 2010

OpenCL GPGPU real-time ray tracing

OpenCL is the new open standard for GPGPU (general-purpose computing on graphics processing units) programming. It supports both graphics cards and multi-core processors with the same C99-based source code. I've re-written the NVIDIA CUDA version of my real-time ray tracer using OpenCL, and run it on an ATI/AMD Radeon HD 5870 GPU. For comparison I also ran it in CPU mode on the Intel i7-980X (6 core, hyperthreaded) processor.



The OpenCL CPU version provided similar results to the pthreads-generic version tested earlier. With 10 objects in the scene the GPU performance was only slightly better than the CPU version. But as the number of objects increased the GPU version maintained performance much better than the CPU version. This indicates that with low object counts the actual work done by each GPU core is small relative to the setup and copying results back overheads. Yes, a realistic ray tracer would be culling the scene graph so fewer objects would be evaluated for each point. And the GPU version ran out of constant memory above 800 objects. But this is much better scaling and performance than the NVIDIA CUDA test I did a few years ago.

Sunday, January 18, 2009

CUDA GPGPU on MacBook Pro Laptop

I've ported my pthread generic and CUDA GPGPU real-time ray tracers to Mac OS X running on a MacBook Pro laptop. It has a 2.4GHz Intel Core 2 Duo processor and a NVIDIA GeForce 9600M GT graphics processor. The Performance for 1 and 2 software threads is comparable to my older Linux desktop, and the CUDA is within a factor of 3 of the desktop graphics card.

Threads Frames Per Second
1 8.5
2 17.4
GPU 16.7

Monday, July 21, 2008

Citations and Uses of Ray Tracer Code

The real-time ray tracing code I wrote for PS3 Cell and CUDA GPGPU is being used by others. David Yuen's group at the Department of Geology and Geophysics and Minnesota Supercomputing Institute at the University of Minnesota used my PS3 code as the starting point for tsunami modeling. From their IEEE Vis 2007 poster session Use of Ray Tracing Techniques on Tsunami Simulation Data with the PlayStation® 3:

"This poster will discuss how we have used the PlayStation® 3’s cell processor to implement and employ parallelized visualization, through the form of ray tracing techniques, on tsunami data. By adapting Eric Rollins’ ray tracing package, we were able to implement his ray casting techniques on triangles. This allowed us to triangulate our tsunami datasets, stored as [x, y, height] data, and feed the triangulated data into the program. We rendered 4000 triangle objects from the data and applied a colormap based on each triangle’s height value. Finally, we displayed the generated image."

They also published a paper Experiments in scientific computation on the PlayStation 3 in the Springer journal Visual Geosciences. This PowerPoint presentation shows images from my and their work.

Other students are trying CUDA GPGPU ray tracing. Michael Allgyer (DOC) cited my work in his masters thesis proposal. Umut Erturk asked me about PS3 versus GPGPU for his thesis. Others are trying to get my CUDA code working on windows.

Saturday, April 5, 2008

Progress in GPGPU Ray Tracing

I've been getting traffic and questions about my pages on Cell and CUDA ray tracing. Saarland University has been doing some interesting work on Cell and CUDA ray tracing including this paper: Realtime Ray Tracing on the GPU with BVH-based Packet Traversal.

Sunday, July 1, 2007

CUDA GPGPU and Pthreads

I've added a new page, Real-Time Ray Tracing with NVIDIA CUDA GPGPU and Intel Quad-Core. I've created two new versions of the ray-tracer code, one utilizing NVIDIA CUDA, and another using pthreads to exercise multi-core CPUs. The CUDA code is fastest, but least realistic as a practical ray-tracer. Pthreads was certainly easiest -- a half hour change to pre-existing generic code. I think CUDA will perform much better on more constrained (in terms of control flow and random memory access) algorithms.

Wednesday, May 2, 2007

PS3 Cell Ray Tracing at MIT, GPGPU at UI

Earlier this year I wrote an article on Real-Time Ray Tracing on the Playstation 3 Cell Processor. MIT is offering a course on Multicore Programming on the PS3. One of the examples presented is the Blue Steel Ray Tracer.

Earlier I also wrote an article on Four-Dimensional Cellular Automata Acceleration Using GPGPU. The University of Illinois at Urbana-Champaign is offering a course on Programming Massively Parallel Processors featuring GPGPU programming on NVIDIA CUDA hardware.

Currently applications must be written specifically for the Cell, conventional multi-core CPUs, or GPGPU. Several organizations are working to develop a common programming model where the same application code could be compiled to run on any of these. One such system is from RapidMind. It's programming model is much like the use of OpenGL within a C++ program. Arrays are defined using RapidMind container types (like OpenGL graphical types), and then embedded programs are invoked on them (like OpenGL Shading Language).