- 1、本文档共9页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
《《Using_Inline_PTX_Assembly_In_CUDA》.pdf
USING INLINE PTX ASSEMBLY IN
CUDA
DA-05713-001_v01 | February 2011
Application Note
DOCUMENT CHANGE HISTORY
DA-05713-001_v01
Version Date Authors Description of Change
01 February 14, 2011 CUDA Initial release
Using Inline PTX Assembly in CUDA DA-05713-001_v01 | ii
TABLE OF CONTENTS
Using Inline PTX Assembly in CUDA 4
Assembler (ASM) Statements 4
Parameters 4
Constraints 6
Pitfalls 7
Namespace Conflicts 7
Memory Space Conflicts 7
Incorrect Optimization 7
Incorrect PTX 8
Error Checking 8
Using Inline PTX Assembly in CUDA DA-05713-001_v01 | iii
USING INLINE PTX ASSEMBLY IN CUDA
The NVIDIA® CUDA™ programming environment provides a parallel thread execution
(PTX) instruction set architecture (ISA) for using the GPU as a data-parallel computing
device. For more information on the PTX ISA, refer to the latest version of the PTX ISA
reference document ptx_isa_[version].pdf in the CUDA Toolkit doc folder.
This application note describes how to inline PTX assembly language statements into
CUDA code.
ASSEMBLER (ASM) STATEMENTS
Assembler statements, asm(), provide a way to insert arbitrary PTX code into your
CUDA program. A simple example is:
asm(membar.gl;);
This inserts a PTX membar.gl into your generated PTX code at the point of the asm()
statement.
Parameters
An asm() statement becomes more complicated, and more useful, when we pass values
in and out of the asm. The basic syntax is as follows:
asm(template-string : constraint(output) : constraint(input));
where you can have multiple input or output operands separated by commas. The
template string contains PTX
您可能关注的文档
- 《《rabbitmq Java入门教程》.pdf
- 《《Real Estate Investment Trusts in the US - Industry Report》.pdf
- 《《Red Hat-Linux-v5.x-iSCSI-Configuration-v1.06》.pdf
- 《《Ref3-IT项目管理》.doc
- 《《Regional innovation strategies》.pdf
- 《《regional-investment-northland》.pdf
- 《《Regionally asymmetric knowledge capabilities and open innovation exploring ‘Globalisation》.pdf
- 《《regional_system_of_innovation》.pdf
- 《《Regulatory Innovation-0》.pdf
- 《《Reinhard Heydrich The Ideal National Socialist 》.doc
- 中国行业标准 GM/T 0126-2023HTML密码应用置标语法.pdf
- 《JJF 2121-2024恒转速源校准规范》.pdf
- 餐饮服务中20条处理要点.docx
- 《GM/T 0011-2023可信计算 可信密码支撑平台功能与接口规范》.pdf
- 《JJF 2134-2024旋转流变仪校准规范》.pdf
- JJF 2121-2024恒转速源校准规范.pdf
- 计量规程规范 JJF 2121-2024恒转速源校准规范.pdf
- 《JJF 2118-2024压力式六氟化硫气体密度控制器校验仪校准规范》.pdf
- JJF 2134-2024旋转流变仪校准规范.pdf
- 计量规程规范 JJF 2134-2024旋转流变仪校准规范.pdf
文档评论(0)