Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望能够使用 PTX 1.3 中尚未在 C 接口中实现的功能。有没有办法在 PTX 中编写我自己的函数并注入到现有的二进制文件中?
我正在寻找的功能是获得价值%smid
%smid
答案:
__noinline__ __device__ uint get_smid(void) { uint ret; asm("mov.u32 %0, %smid;" : "=r"(ret) ); return ret; }