Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an assembly language for CUDA?

Tags:

I'm asking this because I know there's a way to use binary files instead of source files.

Also, I'm guessing that with an assembly language, it would be easier to simulate function pointers. Unless the assembly on a GPU is totally different from the one on a CPU.

like image 696
widgg Avatar asked Sep 08 '11 19:09

widgg


People also ask

What language is used in CUDA?

CUDA Programming Model CUDA's interface is based on C/C++, but you are free to use your preferred programming language, as well as frameworks like OpenCL and HIP.

What assembly language does Nvidia use?

The closest that you can easily get to assembly on NVIDIA GPUs is PTX, which is a virtual assembly language that is compiled by the CUDA driver to the machine code of your GPU before execution.

Does CUDA use C or C++?

CUDA C is essentially C/C++ with a few extensions that allow one to execute functions on the GPU using many threads in parallel.


1 Answers

You might want to take a look at PTX. NVIDIA provides a document describing it in the CUDA 4.0 documentation.

http://developer.nvidia.com/nvidia-gpu-computing-documentation

NVIDIA describes PTX as "Ta low-level parallel thread execution virtual machine and instruction set architecture (ISA). PTX exposes the GPU as a data-parallel computing device." Not exactly like x86 assembly, but you might find it interesting reading.

like image 194
Patrick87 Avatar answered Sep 22 '22 16:09

Patrick87