Live data from Hacker News

Nvidia Opens CUDA Platform, Releases Compiler Source Code

developer.nvidia.com

11–20 of 30 posts

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#11

IMO, open sourcing their GPU libraries would be a much bigger deal than only open sourcing the compiler. I would like to see CUBLAS, CUFFT, CUSPARSE, CURAND, etc all get opened up to the community. The pain is not in compiling GPU code; rather, the pain is in writing good GPU code. The major difference between NVIDIA and AMD (and the major edge NVIDIA has over AMD) is not as much the compiler as it is the libraries.…

Also, OpenCL is not going away, even if someone figured out how to get CUDA code to run well on ATI GPUs. OpenCL is gaining a lot of traction by mobile GPU vendors too (e.g. ARM Mali, Imagination PowerVR, Qualcomm Adreno, etc)

I think you meant OpenCL is not going away, and I agree.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#12
post #11

Earlier quoted context omitted.

Also, OpenCL is not going away, even if someone figured out how to get CUDA code to run well on ATI GPUs. OpenCL is gaining a lot of traction by mobile GPU vendors too (e.g. ARM Mali, Imagination PowerVR, Qualcomm Adreno, etc)

I think you meant OpenCL is not going away, and I agree.

right :) i fixed it.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#13

IMO, open sourcing their GPU libraries would be a much bigger deal than only open sourcing the compiler. I would like to see CUBLAS, CUFFT, CUSPARSE, CURAND, etc all get opened up to the community. The pain is not in compiling GPU code; rather, the pain is in writing good GPU code. The major difference between NVIDIA and AMD (and the major edge NVIDIA has over AMD) is not as much the compiler as it is the libraries.…

> the pain is in writing good GPU code

A viable alternative is to not write the GPU code yourself. Write a code generator in Scala that spits out GPU code in C. For details see Claudio Rebbi's work, which uses Scala as a higher level code genarator for CUDA to solve the Dirac-Wilson equation on the lattice( http://wwwold.jlab.org/conferences/lattice2008/talks/poster/... ). In finance, we are actively looking at CUDA for derivative pricing problems in risk analytics. None of us wants to actually write GPU code in C, and we do have considerable amount of risk analytics work being done in Scala, so a code generator might actually be the way to go.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#14

we just need documentation to understand what the generated code does then, as AFAIK the output is code for undocumented hardware.

It's slightly better documented these days, ever since cuobjdump is bundled with the compiler tools. It allows SASS output, which is supposed to be the native machine code of the Fermis.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#15
post #13

IMO, open sourcing their GPU libraries would be a much bigger deal than only open sourcing the compiler. I would like to see CUBLAS, CUFFT, CUSPARSE, CURAND, etc all get opened up to the community. The pain is not in compiling GPU code; rather, the pain is in writing good GPU code. The major difference between NVIDIA and AMD (and the major edge NVIDIA has over AMD) is not as much the compiler as it is the libraries.…

> the pain is in writing good GPU code A viable alternative is to not write the GPU code yourself. Write a code generator in Scala that spits out GPU code in C. For details see Claudio Rebbi's work, which uses Scala as a higher level code genarator for CUDA to solve the Dirac-Wilson equation on the lattice( http://wwwold.jlab.org/conferences/lattice2008/talks/poster/... ). In finance, we are actively looking at CUDA…

And who writes good GPU code generators if the libraries are poorly understood and / or closed source? Certainly, generators are the way to go for a lot of uses, but not all, and someone still needs to write the generators.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#17
The title of this post is slightly misleading. The actual article does not state that Nvidia has released the source code yet, but only that they are planning to do so in the near future. A signup form is provided so that you can be sent an e-mail when Nvidia actually does release the source code.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#18
post #6

we just need documentation to understand what the generated code does then, as AFAIK the output is code for undocumented hardware.

There's a good chance the LLVM backend will emit PTX, not machine code. PTX is well documented [1]. Under such a system, the generated PTX would be JITed at runtime by the driver. Note that LLVM already has a (very experimental and not complete) PTX backend [2]. [1] http://developer.download.nvidia.com/compute/cuda/3_0/toolki... [2] http://llvm.org/releases/3.0/docs/ReleaseNotes.html#whatsnew

I'm pretty sure this is the case by playing with the OpenCL side of CUDA. If the '--version' flag is passed to the OpenCL compiler (at least the one with CUDA 3.0), info from an LLVM build from a year ago is dumped. The '-cl-nv-verbose' flag is also documented to pass '--verbose' to the ptxas assembler.

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#19
post #13

IMO, open sourcing their GPU libraries would be a much bigger deal than only open sourcing the compiler. I would like to see CUBLAS, CUFFT, CUSPARSE, CURAND, etc all get opened up to the community. The pain is not in compiling GPU code; rather, the pain is in writing good GPU code. The major difference between NVIDIA and AMD (and the major edge NVIDIA has over AMD) is not as much the compiler as it is the libraries.…

> the pain is in writing good GPU code A viable alternative is to not write the GPU code yourself. Write a code generator in Scala that spits out GPU code in C. For details see Claudio Rebbi's work, which uses Scala as a higher level code genarator for CUDA to solve the Dirac-Wilson equation on the lattice( http://wwwold.jlab.org/conferences/lattice2008/talks/poster/... ). In finance, we are actively looking at CUDA…

are you confusing syntax and semantics? there's a hurdle that you need to cross with writing cuda code because it's C-like and easy to make "stupid mistakes". a code generator would help you there. but the harder part is getting the algorithm correct (and optimal, for a range of sizes of data). a generator is not so much use there (except for polymorphism, where templating helps).

or am i missing something? how do you see code generators helping you get algorithms right?

Re: Nvidia Opens CUDA Platform, Releases Compiler Source Code

#20
This answers the #1 objection to using CUDA instead of OpenCL: vendor lock.

What it doesn't answer is who's going to write the compilers and if they will ever happen.

But it does prove NVIDIA is still a player in the many-core game and that there are still a few more rounds to go before there's a winner.

Post reply on HN