Is there an assembly language for CUDA?

前端 未结 3 487
面向向阳花
面向向阳花 2020-12-13 10:13

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

3条回答
  •  一向
    一向 (楼主)
    2020-12-13 10:51

    Yes, the assembly on a GPU is totally different from that of a CPU. One of the differences is that the instruction set for a GPU is not standardized. NVidia (and AMD and other GPU vendors) can and do change their instruction set from one GPU model to the next.

    So CUDA does not expose an assembly language. There'd be no point. (And the limitations in CUDA's C dialect, and whatever other languages they support, are there because of limitations in the GPU hardware, not just because Nvidia hates you and wants to annoy you. So even if you had direct access to the underlying instruction set and assembly language, you wouldn't be able to magically do things you can't do now.

    (Note that there's NVidia does define a "virtual" instruction set that you can use and embed in your code. But it's not the instruction set, and it doesn't map directly to the hardware instructions. It's little more than a simpler programming language which "looks like" a dialect of assembly

提交回复
热议问题