资源描述:
《阿里云高性能计算-优化工具-D》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、高性能计算HPC优化工具高性能计算HPC/优化工具优化工具kepler汇编器概述KeplerAssembler是针对nvidiaKepler架构GPU原生汇编器。可以实现从二进制文件到原生汇编语言生成及其反向过程。能够帮助用户直接控制指令调度以及寄存器使用情况。keplerAssembler让广大用户挖掘Kepler架构系列GPU极限性能成为可能。用户可以用过以下地址访问https://hpc.aliyun.com/tools/assembler1.IntroductionKeplerAssemblerisanalmostf
2、ull-featuredassemblercreatedforNVidia'sKeplerArchitecture.Itcanbeusedtogeneratebinaryfiles(.cubin)fromassemblycode,ortodump"sass"fromagivencubin.Exceptforsomekernels'descriptiveinformation,includingparameternumbersandkernelnames,the"sass"formatsupportedbythistoolis
3、definitelythesameasthosedumpedfrom"cuobjdump".Thefunctionofdumping"sass"codefromexistingcubinisuseful,sinceitisdifficultformosttowritewholeassemblycodefromscratch.Thus,dumpingassemblycodefromacubincompiledbynvcc,tuningthem,thengeneratingcubinwouldbeamoreconvenient,
4、efficientandacceptablewaytousethistool.Justlikeasfermiandmaxas,wewrotethistooltogetextremelyhighdeviceutility.ThetoolsprovidedbyNVidiadidn'tshowenoughsupportivetoourallkindsofneedsinprocessesofpursuingultimateperformance.WithKeplerassembler,itbecomespossibletocontr
5、olkernel'sregisterusagedirectly,toadjustexecutingorderofinstructions,andeventochangetheschedulingdetailsofakernel.FromFermitoMaxwell,NVidiahasbroughtanumberofchangestoeverynewarchitecturegeneration,forexample,newinstructionschedulingstrategy,newISAencoding,andsoon.
6、Therefore,suchkindofassemblercouldnotequipwithenoughbackwardcompatibility.MaxascannotbeusedonKeplerArchitecture,andKeplerassemblerwon'tworkatFermiarchitecture,vicevasa.39高性能计算HPC/优化工具1.InputAssemblyFileFormatIfyouwanttogenerateacubinfilewithyourownself-turningassem
7、bly,youshouldlearntowriteyourkernelwith"sass"asbelowfirst.STS[R5],R4;ST.E[R8],R0;EXIT;BRA0xe0;NOP;NOP;NOP;CTL:00000000CTL:00000000CTL:00000000CTL:00000000CTL:00101110CTL:00000100CTL:00101110MOVR1,c[0x0][0x44];S2RR0,SR_CTAID.X;MOV32IR12,0x4;S2RR3,SR_TID.X;IMADR2,R0,
8、c[0x0][0x28],R3;SHF.L.WR5,RZ,0x2,R2;IADDR8.CC,R5,c[0x0][0x148];CTL:00101100CTL:00101000CTL:00101000CTL:00101000CTL:00100011CTL:00000100CTL:000000