首页 > 解决方案 > 如何查找和禁用特定的 NVCC 警告?

问题描述

特定警告的 NVCC 代码在哪里列出?

查看像这样的其他问题给出了-Xcudafe "--diag_suppress=xxx用于抑制警告“xxx”的答案,并链接到此处的可能警告列表。

但是,当我收到警告时

/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h(94): warning: __host__ annotation is ignored on a function("no_assignment_operator") that is explicitly defaulted on its first declaration

/usr/include/eigen3/Eigen/src/Core/util/XprHelper.h(94): warning: __device__ annotation is ignored on a function("no_assignment_operator") that is explicitly defaulted on its first declaration

我在列表中找不到该类型。有人可以将我指向它所在的页面,以便我找到它的代码/名称吗?我没有在NVCC 的文档中找到它。

标签: cudaeigennvcc

解决方案


您可以将标志传递给 NVCC,而不是寻找警告的字符串代码 --display_error_number,并获取该错误的编号。然后你可以禁用它:

-Xcudafe --diag_suppress=1234

或任何错误号。


推荐阅读