diff --git a/cpp/include/cudf/column/column_view.hpp b/cpp/include/cudf/column/column_view.hpp index 4889a62bbe4..6d722675626 100644 --- a/cpp/include/cudf/column/column_view.hpp +++ b/cpp/include/cudf/column/column_view.hpp @@ -329,9 +329,13 @@ class column_view : public detail::column_view_base { // they then end up being called by a simple __host__ function // (eg std::vector destructor) you get a compile error because you're trying to // call a __host__ __device__ function from a __host__ function. +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif ~column_view() = default; +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif column_view(column_view const&) = default; ///< Copy constructor column_view(column_view&&) = default; ///< Move constructor /** diff --git a/cpp/include/cudf/detail/aggregation/aggregation.hpp b/cpp/include/cudf/detail/aggregation/aggregation.hpp index b688bf3d445..4d3984cab93 100644 --- a/cpp/include/cudf/detail/aggregation/aggregation.hpp +++ b/cpp/include/cudf/detail/aggregation/aggregation.hpp @@ -1396,7 +1396,9 @@ AGG_KIND_MAPPING(aggregation::VARIANCE, var_aggregation); * @param args Parameter pack forwarded to the `operator()` invocation * @return Forwards the return value of the callable. */ +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif template CUDF_HOST_DEVICE inline decltype(auto) aggregation_dispatcher(aggregation::Kind k, F&& f, @@ -1478,7 +1480,9 @@ CUDF_HOST_DEVICE inline decltype(auto) aggregation_dispatcher(aggregation::Kind template struct dispatch_aggregation { +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif template CUDF_HOST_DEVICE inline decltype(auto) operator()(F&& f, Ts&&... args) const { @@ -1487,7 +1491,9 @@ struct dispatch_aggregation { }; struct dispatch_source { +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif template CUDF_HOST_DEVICE inline decltype(auto) operator()(aggregation::Kind k, F&& f, Ts&&... args) const { @@ -1511,7 +1517,9 @@ struct dispatch_source { * @param args Parameter pack forwarded to the `operator()` invocation * `F`. */ +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif template CUDF_HOST_DEVICE inline constexpr decltype(auto) dispatch_type_and_aggregation(data_type type, aggregation::Kind k, diff --git a/cpp/include/cudf/detail/interop.hpp b/cpp/include/cudf/detail/interop.hpp index 7117517487c..3d4832c8d17 100644 --- a/cpp/include/cudf/detail/interop.hpp +++ b/cpp/include/cudf/detail/interop.hpp @@ -19,11 +19,15 @@ // We disable warning 611 because the `arrow::TableBatchReader` only partially // override the `ReadNext` method of `arrow::RecordBatchReader::ReadNext` // triggering warning 611-D from nvcc. +#ifdef __CUDACC__ #pragma nv_diag_suppress 611 #pragma nv_diag_suppress 2810 +#endif #include +#ifdef __CUDACC__ #pragma nv_diag_default 611 #pragma nv_diag_default 2810 +#endif #include #include diff --git a/cpp/include/cudf/interop.hpp b/cpp/include/cudf/interop.hpp index 7e4eefa86b3..e210179b147 100644 --- a/cpp/include/cudf/interop.hpp +++ b/cpp/include/cudf/interop.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022, NVIDIA CORPORATION. + * Copyright (c) 2020-2023, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,11 +19,15 @@ // We disable warning 611 because the `arrow::TableBatchReader` only partially // override the `ReadNext` method of `arrow::RecordBatchReader::ReadNext` // triggering warning 611-D from nvcc. +#ifdef __CUDACC__ #pragma nv_diag_suppress 611 #pragma nv_diag_suppress 2810 +#endif #include +#ifdef __CUDACC__ #pragma nv_diag_default 611 #pragma nv_diag_default 2810 +#endif #include #include diff --git a/cpp/include/cudf/io/datasource.hpp b/cpp/include/cudf/io/datasource.hpp index 12b8377bff2..5c37be5a56f 100644 --- a/cpp/include/cudf/io/datasource.hpp +++ b/cpp/include/cudf/io/datasource.hpp @@ -27,16 +27,24 @@ // We disable warning 611 because some Arrow subclasses of // `arrow::fs::FileSystem` only partially override the `Equals` method, // triggering warning 611-D from nvcc. +#ifdef __CUDACC__ #pragma nv_diag_suppress 611 +#endif #include #include +#ifdef __CUDACC__ #pragma nv_diag_default 611 +#endif // We disable warning 2810 to workaround the compile issue (warning treated as error): // result.h(263): error #2810-D: ignoring return value type with "nodiscard" attribute +#ifdef __CUDACC__ #pragma nv_diag_suppress 2810 +#endif #include +#ifdef __CUDACC__ #pragma nv_diag_default 2810 +#endif #include #include diff --git a/cpp/include/cudf/utilities/type_dispatcher.hpp b/cpp/include/cudf/utilities/type_dispatcher.hpp index ac6ef75c824..a80cd15d3c6 100644 --- a/cpp/include/cudf/utilities/type_dispatcher.hpp +++ b/cpp/include/cudf/utilities/type_dispatcher.hpp @@ -433,7 +433,9 @@ using scalar_device_type_t = typename type_to_scalar_type_impl::ScalarDeviceT */ // This pragma disables a compiler warning that complains about the valid usage // of calling a __host__ functor from this function which is __host__ __device__ +#ifdef __CUDACC__ #pragma nv_exec_check_disable +#endif template