Skip to content

Commit

Permalink
try suppressing unreachable-code diagnostics from nvcc (this should b…
Browse files Browse the repository at this point in the history
…e narrowed down / upstreamed before merging)
  • Loading branch information
jameslamb committed Sep 17, 2024
1 parent 3b83970 commit 3ba2201
Show file tree
Hide file tree
Showing 38 changed files with 77 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/agglomerative.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/connectivities.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <thrust/iterator/zip_iterator.h>
#include <thrust/transform.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/kmeans.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@
#include <raft/random/rng.cuh>
#include <raft/util/cuda_utils.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cuda.h>
#include <thrust/fill.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/kmeans_balanced.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
#include <raft/util/device_atomics.cuh>
#include <raft/util/integer_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_scalar.hpp>
#include <rmm/mr/device/managed_memory_resource.hpp>
#include <rmm/resource_ref.hpp>
#pragma nv_diag_default 128

#include <thrust/gather.h>
#include <thrust/transform.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/kmeans_common.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@
#include <raft/random/rng.cuh>
#include <raft/util/cuda_utils.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cub/cub.cuh>
#include <cuda.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/mst.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <thrust/device_ptr.h>
#include <thrust/execution_policy.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/cluster/detail/single_linkage.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

namespace raft::cluster::detail {

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/comms/detail/mpi_comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#include <raft/core/resources.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_scalar.hpp>
#pragma nv_diag_default 128

#include <mpi.h>
#include <nccl.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/comms/detail/std_comms.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#include <raft/core/resources.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cuda_runtime.h>
#include <thrust/iterator/zip_iterator.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/comms/detail/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
#include <raft/core/resource/cuda_stream.hpp>
#include <raft/core/resources.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <iostream>
#include <numeric>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/detail/callback_sink.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
#include <iostream>
#include <mutex>

#pragma nv_diag_suppress 128
#define SPDLOG_HEADER_ONLY
#include <spdlog/common.h>
#include <spdlog/details/log_msg.h>
#include <spdlog/sinks/base_sink.h>
#pragma nv_diag_default 128

namespace spdlog::sinks {

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/detail/nvtx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

#pragma once

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128

#ifdef NVTX_ENABLED

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/device_container_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
#include <raft/core/resource/device_memory_resource.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_uvector.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/resource_ref.hpp>
#pragma nv_diag_default 128

#include <thrust/device_ptr.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/device_mdarray.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include <raft/core/mdarray.hpp>
#include <raft/core/resources.hpp>

#pragma nv_diag_suppress 128
#include <rmm/resource_ref.hpp>
#pragma nv_diag_default 128

#include <cstdint>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/device_resources.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@
#include <raft/core/resource/thrust_policy.hpp>
#include <raft/core/resources.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_pool.hpp>
#include <rmm/exec_policy.hpp>
#include <rmm/mr/device/device_memory_resource.hpp>
#pragma nv_diag_default 128

#include <cuda_runtime.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/device_resources_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@
#include <raft/core/device_resources.hpp>
#include <raft/core/device_setter.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_device.hpp>
#include <rmm/cuda_stream.hpp>
#include <rmm/cuda_stream_pool.hpp>
#include <rmm/mr/device/cuda_memory_resource.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#pragma nv_diag_default 128

#include <algorithm>
#include <memory>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/interruptible.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <raft/core/error.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128

#include <memory>
#include <mutex>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/logger-inl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
#include <raft/core/detail/callback_sink.hpp>
#include <raft/core/detail/macros.hpp> // RAFT_INLINE_CONDITIONAL

#pragma nv_diag_suppress 128
#include <spdlog/sinks/stdout_color_sinks.h> // NOLINT
#include <spdlog/spdlog.h> // NOLINT
#pragma nv_diag_default 128

namespace raft {

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/managed_container_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#include <raft/core/resource/device_memory_resource.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/mr/device/managed_memory_resource.hpp>
#pragma nv_diag_default 128

namespace raft {
/**
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/resource/cuda_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#include <raft/core/resources.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128

#include <cuda_runtime.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/resource/cusolver_dn_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include <raft/core/resource/resource_types.hpp>
#include <raft/core/resources.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128

#include <cusolverDn.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/resource/device_memory_resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
#include <raft/core/resources.hpp>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/mr/device/device_memory_resource.hpp>
#include <rmm/mr/device/limiting_resource_adaptor.hpp>
#include <rmm/mr/device/per_device_resource.hpp>
#include <rmm/mr/device/pool_memory_resource.hpp>
#pragma nv_diag_default 128

#include <cstddef>
#include <optional>
Expand Down
3 changes: 3 additions & 0 deletions cpp/include/raft/core/resource/thrust_policy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
#include <raft/core/resource/resource_types.hpp>
#include <raft/core/resources.hpp>

#pragma nv_diag_suppress 128
#include <rmm/exec_policy.hpp>
#pragma nv_diag_default 128

namespace raft::resource {
class thrust_policy_resource : public resource {
public:
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/core/stream_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#ifndef RAFT_DISABLE_CUDA
#include <raft/core/interruptible.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128
#endif

namespace raft {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
#include <raft/util/cudart_utils.hpp> // getMultiProcessorCount
#include <raft/util/cutlass_utils.cuh> // RAFT_CUTLASS_TRY

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cuda/semaphore>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/distance/detail/masked_nn.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
#include <raft/linalg/contractions.cuh>
#include <raft/util/cuda_utils.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <stdint.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
#include <raft/distance/detail/distance_ops/cutlass.cuh>
#include <raft/util/cutlass_utils.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cutlass/cutlass.h>
#include <cutlass/gemm/device/gemm.h>
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/distance/distance-ext.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
#include <raft/distance/distance_types.hpp> // raft::distance::DistanceType
#include <raft/util/raft_explicit.hpp> // RAFT_EXPLICIT

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp> // rmm::device_uvector
#pragma nv_diag_default 128

#ifdef RAFT_EXPLICIT_INSTANTIATE_ONLY

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/distance/distance-inl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@
#include <raft/distance/detail/distance.cuh>
#include <raft/distance/distance_types.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <type_traits>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/label/detail/classlabels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cub/cub.cuh>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/coalesced_reduction-inl.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#include <raft/core/operators.hpp>
#include <raft/util/cuda_utils.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cub/cub.cuh>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/eig.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
#include <raft/matrix/copy.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream.hpp>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <cuda_runtime_api.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/lstsq.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
#include <raft/matrix/math.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

namespace raft {
namespace linalg {
Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/map.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#include <raft/util/pow2_utils.cuh>
#include <raft/util/vectorized.cuh>

#pragma nv_diag_suppress 128
#include <rmm/cuda_stream_view.hpp>
#pragma nv_diag_default 128

#include <thrust/tuple.h>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/qr.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#include <raft/core/resources.hpp>
#include <raft/matrix/triangular.cuh>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

#include <algorithm>

Expand Down
2 changes: 2 additions & 0 deletions cpp/include/raft/linalg/detail/svd.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
#include <raft/util/cuda_utils.cuh>
#include <raft/util/cudart_utils.hpp>

#pragma nv_diag_suppress 128
#include <rmm/device_scalar.hpp>
#include <rmm/device_uvector.hpp>
#pragma nv_diag_default 128

namespace raft {
namespace linalg {
Expand Down
Loading

0 comments on commit 3ba2201

Please sign in to comment.