From b02386476ab68028bcf327896fd20935f62fb0cb Mon Sep 17 00:00:00 2001 From: Gregor Daiss Date: Wed, 13 Mar 2024 13:33:20 -0500 Subject: [PATCH 1/6] Disable noexcept for cuda builds --- .../execution/include/hpx/execution/algorithms/just.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/core/execution/include/hpx/execution/algorithms/just.hpp b/libs/core/execution/include/hpx/execution/algorithms/just.hpp index 3f1e97ff78a7..b2b662168c13 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/just.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/just.hpp @@ -102,8 +102,10 @@ namespace hpx::execution::experimental { template friend auto tag_invoke( - connect_t, just_sender&& s, Receiver&& receiver) noexcept(util:: - all_of_v...>) + connect_t, just_sender&& s, Receiver&& receiver) +#if !defined(HPX_CUDA_VERSION) + noexcept(util::all_of_v...>) +#endif { return operation_state{ HPX_FORWARD(Receiver, receiver), HPX_MOVE(s.ts)}; From 41435812ebf9eb6005d9b23c7b1bf91b8fe055f0 Mon Sep 17 00:00:00 2001 From: Gregor Daiss Date: Wed, 13 Mar 2024 13:33:58 -0500 Subject: [PATCH 2/6] Make sure tests only run with cuda >= 12.3 --- libs/core/async_cuda/tests/performance/synchronize.cu | 5 +++-- libs/core/async_cuda/tests/unit/transform_stream.cu | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/libs/core/async_cuda/tests/performance/synchronize.cu b/libs/core/async_cuda/tests/performance/synchronize.cu index d206638da99a..84164c7178a7 100644 --- a/libs/core/async_cuda/tests/performance/synchronize.cu +++ b/libs/core/async_cuda/tests/performance/synchronize.cu @@ -6,8 +6,9 @@ #include -// NVCC fails unceremoniously with this test at least until V12.1 -#if !defined(HPX_CUDA_VERSION) || (HPX_CUDA_VERSION > 1201) +// NVCC fails unceremoniously with this test until V12.2 +// Fixed in CUDA 12.3 +#if !defined(HPX_CUDA_VERSION) || (HPX_CUDA_VERSION > 1202) #include #include diff --git a/libs/core/async_cuda/tests/unit/transform_stream.cu b/libs/core/async_cuda/tests/unit/transform_stream.cu index d8ad49613be9..fb85bb19af58 100644 --- a/libs/core/async_cuda/tests/unit/transform_stream.cu +++ b/libs/core/async_cuda/tests/unit/transform_stream.cu @@ -6,8 +6,9 @@ #include -// NVCC fails unceremoniously with this test at least until V12.1 -#if !defined(HPX_CUDA_VERSION) || (HPX_CUDA_VERSION > 1201) +// NVCC fails unceremoniously with this test until 12.2 +// Fixed in CUDA 12.3 +#if !defined(HPX_CUDA_VERSION) || (HPX_CUDA_VERSION > 1202) #include #include @@ -292,6 +293,7 @@ int hpx_main() cu::check_cuda_error(cudaFree(p)); } + std::cout << "Test finished!" << std::endl; return hpx::local::finalize(); } From 58d3d2fdf71599f5cf410b28908600e59893705c Mon Sep 17 00:00:00 2001 From: Gregor Daiss Date: Wed, 13 Mar 2024 17:11:47 -0500 Subject: [PATCH 3/6] Use HPX_DEVICE_CODE for ifdef guard --- libs/core/execution/include/hpx/execution/algorithms/just.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/core/execution/include/hpx/execution/algorithms/just.hpp b/libs/core/execution/include/hpx/execution/algorithms/just.hpp index b2b662168c13..ada2b0622bdc 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/just.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/just.hpp @@ -103,7 +103,7 @@ namespace hpx::execution::experimental { template friend auto tag_invoke( connect_t, just_sender&& s, Receiver&& receiver) -#if !defined(HPX_CUDA_VERSION) +#if !defined(HPX_COMPUTE_DEVICE_CODE) noexcept(util::all_of_v...>) #endif { From 74db25dca1789bc98f2e92109e741268ba1d5734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Tue, 26 Mar 2024 11:39:27 +0100 Subject: [PATCH 4/6] Fix format --- libs/core/async_cuda/tests/unit/transform_stream.cu | 1 + libs/core/execution/include/hpx/execution/algorithms/just.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/core/async_cuda/tests/unit/transform_stream.cu b/libs/core/async_cuda/tests/unit/transform_stream.cu index fb85bb19af58..45da2a9e80e6 100644 --- a/libs/core/async_cuda/tests/unit/transform_stream.cu +++ b/libs/core/async_cuda/tests/unit/transform_stream.cu @@ -17,6 +17,7 @@ #include #include +#include #include __global__ void dummy_kernel() {} diff --git a/libs/core/execution/include/hpx/execution/algorithms/just.hpp b/libs/core/execution/include/hpx/execution/algorithms/just.hpp index ada2b0622bdc..e36073bbd1eb 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/just.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/just.hpp @@ -103,7 +103,7 @@ namespace hpx::execution::experimental { template friend auto tag_invoke( connect_t, just_sender&& s, Receiver&& receiver) -#if !defined(HPX_COMPUTE_DEVICE_CODE) +#if !defined(HPX_COMPUTE_DEVICE_CODE) noexcept(util::all_of_v...>) #endif { From 26b92c075e3cea445e7c6356dfa90e2b11ac622a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Tue, 26 Mar 2024 11:57:40 +0100 Subject: [PATCH 5/6] Fix endline whitespace --- libs/core/execution/include/hpx/execution/algorithms/just.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/core/execution/include/hpx/execution/algorithms/just.hpp b/libs/core/execution/include/hpx/execution/algorithms/just.hpp index e36073bbd1eb..1fbd3cf3f63c 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/just.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/just.hpp @@ -102,7 +102,7 @@ namespace hpx::execution::experimental { template friend auto tag_invoke( - connect_t, just_sender&& s, Receiver&& receiver) + connect_t, just_sender&& s, Receiver&& receiver) #if !defined(HPX_COMPUTE_DEVICE_CODE) noexcept(util::all_of_v...>) #endif From 3c88a735d10d4a513d830c9e58463cf3b30f8640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20Dai=C3=9F?= Date: Tue, 26 Mar 2024 14:25:36 +0100 Subject: [PATCH 6/6] Fix clang format --- libs/core/execution/include/hpx/execution/algorithms/just.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/core/execution/include/hpx/execution/algorithms/just.hpp b/libs/core/execution/include/hpx/execution/algorithms/just.hpp index 1fbd3cf3f63c..0298da669b8c 100644 --- a/libs/core/execution/include/hpx/execution/algorithms/just.hpp +++ b/libs/core/execution/include/hpx/execution/algorithms/just.hpp @@ -104,7 +104,8 @@ namespace hpx::execution::experimental { friend auto tag_invoke( connect_t, just_sender&& s, Receiver&& receiver) #if !defined(HPX_COMPUTE_DEVICE_CODE) - noexcept(util::all_of_v...>) + noexcept( + util::all_of_v...>) #endif { return operation_state{