我可以获取用作__nv_nvrtc_builtin_header.h的内容吗?

时间:2020-09-01 10:43:44

标签: cuda jit nvrtc cuda-driver

我正在对使用nvrtc库编译的内核(带有debug和lineinfo)进行性能分析。在分析结果中,许多样本都列在__nv_nvrtc_builtin_header.h之内。但是-磁盘上显然没有这样的文件,自然(?)NVIDIA Compute源代码视图找不到该文件。

我的问题:

  • __nv_nvrtc_builtin_header.h中实际上是什么?
  • 我可以查看这个神秘标题的内容吗? (如果有帮助,假设可以修改/添加我用来执行编译的代码。)

2 个答案:

答案 0 :(得分:3)

__nv_nvrtc_builtin_header.h中实际上是什么?

否则您将在标准CUDA中获得的所有标准定义包括该工具链在编译过程中自动包含的内部工具链/主机编译器标头。只是全部组装成一个大文件。

我可以查看这个神秘标题的内容吗?

标头包含在nvrtc-builtins库中,并且您应该能够在平台上使用必需的库转储实用程序进行查看。例如:

$ objdump -s libnvrtc-builtins.so

  [snipped for brevity]

Contents of section .rodata:
 0007a0 2f2a0a20 2a20436f 70797269 67687420  /*. * Copyright
 0007b0 31393933 2d323031 36204e56 49444941  1993-2016 NVIDIA
 0007c0 20436f72 706f7261 74696f6e 2e202041   Corporation.  A
 0007d0 6c6c2072 69676874 73207265 73657276  ll rights reserv
 0007e0 65642e0a 202a0a20 2a204e4f 54494345  ed.. *. * NOTICE
 0007f0 20544f20 4c494345 4e534545 3a0a202a   TO LICENSEE:. *
 000800 0a202a20 54686973 20736f75 72636520  . * This source
 000810 636f6465 20616e64 2f6f7220 646f6375  code and/or docu
 000820 6d656e74 6174696f 6e202822 4c696365  mentation ("Lice
 000830 6e736564 2044656c 69766572 61626c65  nsed Deliverable
 000840 73222920 6172650a 202a2073 75626a65  s") are. * subje
 000850 63742074 6f204e56 49444941 20696e74  ct to NVIDIA int
 000860 656c6c65 63747561 6c207072 6f706572  ellectual proper
 000870 74792072 69676874 7320756e 64657220  ty rights under
 000880 552e532e 20616e64 0a202a20 696e7465  U.S. and. * inte
 000890 726e6174 696f6e61 6c20436f 70797269  rnational Copyri
 0008a0 67687420 6c617773 2e0a202a 0a202a20  ght laws.. *. *
 0008b0 54686573 65204c69 63656e73 65642044  These Licensed D
 0008c0 656c6976 65726162 6c657320 636f6e74  eliverables cont

(如果我显示更多内容,可能违反了EULA ...

答案 1 :(得分:0)

添加到@talonmies answer

如果删除objdump标头行,则可以通过STREAM competed_results AS SELECT * FROM agg_stream WHERE IS_COMPLETE(EVENTS); 传递实际的转储行以正确获得xxd -r文本:

__nv_nvrtc_builtin_header.h
相关问题