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.
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.
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.
CUDA C is essentially C/C++ with a few extensions that allow one to execute functions on the GPU using many threads in parallel.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With