显卡有自己的指令集吗?

发布于 2024-08-09 22:53:19 字数 164 浏览 1 评论 0 原文

显卡有自己的指令集吗? 我认为它们是这样的,但我一直想知道它们是否是专有的,或者是否存在某种开放标准。

每条 GPU 指令前面都有一条 CPU 指令,还是无缝的?

也就是说,OpenGL 或 DirectX 是否通过 CPU 调用驱动程序层,然后通过总线发送 GPU 指令,还是更复杂?

Do graphic cards have instruction sets of their own?
I assume they do, but I have been wondering if they are proprietary or if there is some sort of open standard.

Is every GPU instruction preceded by a CPU instruction or is it seamless?

That is, does OpenGL or DirectX call on the driver layer via the CPU which then sends a GPU instruction down the bus or is it more elaborate?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

埖埖迣鎅 2024-08-16 22:53:19

是的,他们确实这么做了。 AMD目前甚至提供了HD4000系列的规格。

请查看此处 AMD 的 R700 指令集参考指南。

还有一个名为 Nouveau 的开源项目,它对 Nvidia 指令集进行逆向工程。

请注意,Nvidia 的架构与 AMD 略有不同,因为它们不使用 VLIW 而是标量执行(尽管多个线程另外分组为所谓的“扭曲”或“波前”)。

此外,并非每个 OpenGL/Direct3D 调用都映射到“GPU 指令”。例如,当绑定纹理时,驱动程序只会设置适当的硬件寄存器,告诉 GPU 使用哪个纹理内存进行采样。

真正的程序只有在 GPU 上执行着色器或流处理内核时才会运行。

Yes they do. AMD even provides the specification up to the HD4000 series at the moment.

Take a look here at AMD's R700 instruction set reference guide.

There is also an open source project called Nouveau that does reverse engineering of the Nvidia instruction sets.

Note that Nvidia has a slightly different architecture than AMD because they do not use VLIW but scalar execution (although multiple threads are additionally grouped in what is called a Warp or a Wavefront).

Also, not every OpenGL/Direct3D call maps to a "GPU instruction". For example, when binding a texture the driver will only set appropriate hardware registers that tell the GPU which texture memory to use for sampling.

Real programs are only run when executing shaders or stream processing kernels on the GPU.

一个人的旅程 2024-08-16 22:53:19

是的,GPU 有自己专有的指令集。 GPU指令的执行独立于CPU指令。

Yes, the GPU have their own proprietrary instruction sets. The GPU instructions are executed independent from the CPU instructions.

梦里°也失望 2024-08-16 22:53:19

目前,NVIDIA 卡使用某种称为 PTX 的中间 ISA。您可以在本文档中阅读相关内容:

PTX ISA 1.1

PTX 程序在安装时进行翻译到目标硬件指令集。

Currently, NVIDIA cards use some kind of intermediate ISA called PTX. You can read about it in this document:

PTX ISA 1.1

PTX programs are translated at install time to the target hardware instruction set.

·深蓝 2024-08-16 22:53:19

For nvidia cards you might want to have a look at this document http://docs.nvidia.com/cuda/cuda-binary-utilities/index.html#instruction-set-ref

一百个冬季 2024-08-16 22:53:19

AMD 下一代图形核心 (GCN)

https://en.wikipedia.org/ wiki/Graphics_Core_Next

第一代被称为“南方群岛”。

wiki 页面链接到记录 ISA 的 AMD 规范,例如: http: //developer.amd.com/wordpress/media/2012/12/AMD_Southern_Islands_Instruction_Set_Architecture.pdf

甚至还有一个名为 MIAOW 的开放 RTL 实现 https://github.com/VerticalResearchGroup/miaow,尽管它可能侵犯了 AMD 目前只是选择默默容忍的一些知识产权 (来源)。

AMD CDNA

根据维基百科:https://en.wikipedia.org/wiki /AMD_Instinct 较新的 AMD 专注于计算的 GPU 产品(例如 Instinct 系列)似乎使用 CDNA 架构,例如:

SPIR -V

https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation 是一种 Krhonos 标准中间语言。

它的设计可能与现有的 GPU ISA 类似,因此它更具可实现性并具有更好的采用性,因此它应该能够很好地了解实际的 GPU ISA。

如果这个标准确实流行起来,就像 Vulkan 和 OpenCL 2.1 中采用的情况一样,未来的实现很可能被设计为紧密实现以获得更好的性能。

如何获取和修改 PTX

如何创建或操作 GPU 汇编器?

相关

https://computergraphics.stackexchange.com/questions/7809/what-does-gpu-assemble-look-like

AMD Graphics Core Next (GCN)

https://en.wikipedia.org/wiki/Graphics_Core_Next

The first generation is called "Southern Islands".

The wiki page links to AMD specs that document the ISA, e.g.: http://developer.amd.com/wordpress/media/2012/12/AMD_Southern_Islands_Instruction_Set_Architecture.pdf

There is even an open RTL implementation called MIAOW https://github.com/VerticalResearchGroup/miaow, although it likely infringes some IP which AMD has merely chosen to tolerated in silence for now (source).

AMD CDNA

According to Wikipedia: https://en.wikipedia.org/wiki/AMD_Instinct newer AMD compute focused GPU products such as the Instinct line seem to use the CDNA architecture, e.g.:

SPIR-V

https://en.wikipedia.org/wiki/Standard_Portable_Intermediate_Representation is a Krhonos standard intermediate language.

It is likely designed to be similar to existing GPU ISAs, so that it will be more implementable and have better adoption, so it should give a good idea of actual GPU ISAs.

And if this standard does catch on, as it seem to be the case due to adoption in Vulkan and OpenCL 2.1, future implementations are likely be designed to implement is closely to have better performance.

How to obtain and modify PTX

How to create or manipulate GPU assembler?

Related

https://computergraphics.stackexchange.com/questions/7809/what-does-gpu-assembly-look-like

灰色世界里的红玫瑰 2024-08-16 22:53:19

请参阅:CUDA 编程指南版本 3.0

设备的计算能力由主修订号和次要修订号定义
修订号。

具有相同主修订号的设备具有相同的核心架构。这
基于 Fermi 架构的器件的主要修订号为 2。 先前的器件
均为计算能力 1.x(其主要修订号为 1)。

次要修订号对应于核心的增量改进
架构,可能包括新功能。

附录 A 列出了所有支持 CUDA 的设备及其计算能力。
附录G给出了每种计算能力的技术规范。

See: CUDA Programming Guide Version 3.0

The compute capability of a device is defined by a major revision number and a minor
revision number.

Devices with the same major revision number are of the same core architecture. The
major revision number of devices based on the Fermi architecture is 2. Prior devices
are all of compute capability 1.x (Their major revision number is 1).

The minor revision number corresponds to an incremental improvement to the core
architecture, possibly including new features.

Appendix A lists of all CUDA-enabled devices along with their compute capability.
Appendix G gives the technical specifications of each compute capability.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文