【问题标题】:nvcc fatal : '--ptxas-options=-v': expected a numbernvcc 致命:'--ptxas-options=-v':期望一个数字
【发布时间】:2019-10-24 02:39:27
【问题描述】:

当我尝试构建a Windows port of Faster-RCNN 时出现nvcc fatal : '--ptxas-options=-v': expected a number 错误。您可以直接从here 访问设置文件(这是一个 Python 脚本)。

软件环境:

- CUDA v10.1
- VS 2019
- Python 3.7
- Windows 10

【问题讨论】:

    标签: cuda nvcc pycuda faster-rcnn


    【解决方案1】:

    在 CUDA 10.1 中,此配置行不再正确:

    nvcc_compile_args = ['-O', '--ptxas-options=-v', '-arch=sm_35', '-c', '--compiler-options=-fPIC']
    

    这将生成一个如下所示的 nvcc 编译命令:

    nvcc -O ...
    

    对于 CUDA 10.0 和更早版本,这样的命令是合法的。对于 CUDA 10.1,情况并非如此。这个开关通过了主机代码的优化级别,所以除非有任何理由不这样做,我建议在这里传递-O3

    nvcc_compile_args = ['-O3', '--ptxas-options=-v', '-arch=sm_35', '-c', '--compiler-options=-fPIC']
    

    相关文档链接为here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-02
      • 1970-01-01
      • 2021-11-11
      • 2019-08-02
      • 2021-09-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多