本文介绍了是否有CUDA汇编语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我问这个,因为我知道有使用的二进制文件,而不是源文件的方法。

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

另外,我猜,使用汇编语言,它会更容易模拟函数指针。除非在GPU上的组件是由一个CPU上所述一个完全不同的

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.

推荐答案

是的,在GPU上的装配是从一个CPU的完全不同。
一个区别是,对于一个GPU的指令集不规范。 NVIDIA(和AMD等GPU供应商)可以而且确实从一个GPU型号改变自己的指令集下。

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.

所以,CUDA不公开的汇编语言。有会是没有意义的。 (在CUDA的C语言的限制,并且支持任何其他语言,还有因为在GPU硬件限制,不只是因为Nvidia的恨你,要想让你生气,所以即使你有底层指令集的直接访问和汇编语言,你就不能够神奇地做事,你不能现在做的。

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.

(注意,有NVIDIA没有定义,你可以用在你的code嵌入一个虚拟的指令集,但它不是的的指令集,它不直接映射硬件指令,它比一个更简单的编程语言,看起来像组件的方言

(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

这篇关于是否有CUDA汇编语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 17:08