首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我能得到什么是作为__nv_nvrtc_builtin_header.h吗?

我能得到什么是作为__nv_nvrtc_builtin_header.h吗?
EN

Stack Overflow用户
提问于 2020-09-01 10:43:44
回答 2查看 122关注 0票数 1

我正在使用nvrtc库分析编译的内核(带有调试和lineinfo)。在分析结果中,许多样本都列在__nv_nvrtc_builtin_header.h中。但是--显然磁盘上没有这样的文件,而且很自然地(?)NVIDIA计算源视图无法找到它。

我的问题:

__nv_nvrtc_builtin_header.h

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

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-09-01 11:02:29

__nv_nvrtc_builtin_header.h实际上是什么?

否则,在标准CUDA中获得的所有标准定义都包括和内部工具链/主机编译器头,这些工具链在编译期间自动包含。只是集中在一个巨大的文件里。

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

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

代码语言:javascript
复制
$ 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

(如果我出示更多.)

票数 3
EN

Stack Overflow用户

发布于 2020-09-02 11:06:07

添加到@talonmies answer

如果删除objdump头行,则可以通过xxd -r传递实际的转储行以获得正确的__nv_nvrtc_builtin_header.h文本:

代码语言:javascript
复制
$ objdump -s --section=.rodata /usr/local/cuda/lib64/libnvrtc-builtins.so | tail +5 | xxd -r | sed -r '1s/^.*\//\//;' | less

/*
 * Copyright 1993-2016 NVIDIA Corporation.  All rights reserved.
 *
 * NOTICE TO LICENSEE:
 *
 * This source code and/or documentation ("Licensed Deliverables") are
 * subject to NVIDIA intellectual property rights under U.S. and
 * international Copyright laws.
 *
 * These Licensed Deliverables contained herein is PROPRIETARY and
 * CONFIDENTIAL to NVIDIA and is being provided under the terms and

(最后一个sed在第6行的开头删除了一些垃圾-如CUDA 11.6)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63686104

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档