Skip to content

Commit dc22feb

Browse files
authored
Suppress host/device usage warning (#2192)
This pragma is a workaround for cudf build issues, see e.g. https://github.com/rapidsai/cudf/actions/runs/20384141895/job/58581416851?pr=20929. The thrust allocator class needs to be reworked eventually anyway due to the upstream allocator being deprecated, so this workaround is acceptable for now. I'm entirely confused as to why this line is where the suppression is needed and I suspect that this is a completely false diagnostic from nvcc, but for now I think it's acceptable to add this as a workaround to get builds passing. I verified that this fixes cudf builds in a local devcontainer reproducing the issue. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Bradley Dice (https://github.com/bdice) URL: #2192
1 parent 589ea27 commit dc22feb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/include/rmm/detail/runtime_capabilities.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ struct export_handle_type {
8484
* @return true if supported
8585
* @return false if unsupported
8686
*/
87+
#ifdef __CUDACC__
88+
// This suppression was needed due to a false positive warning from nvcc. We
89+
// should be able to remove it altogether once we rework the thrust allocator.
90+
#pragma nv_diag_suppress 20011
91+
#endif
8792
struct hwdecompress {
8893
static bool is_supported()
8994
{
@@ -100,6 +105,9 @@ struct hwdecompress {
100105
#endif
101106
}
102107
};
108+
#ifdef __CUDACC__
109+
#pragma nv_diag_default 20011
110+
#endif
103111

104112
/**
105113
* @brief Check if the current device supports concurrent managed access.

0 commit comments

Comments
 (0)