Skip to content

Commit 55aba0c

Browse files
authored
Merge pull request #2182 from fallintoplace/fix/nvexec-launch-error-signature
Fix nvexec launch error signature
2 parents e85d9a1 + b08daa3 commit 55aba0c

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

include/nvexec/stream/launch.cuh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace nv::execution
119119
template <class Fun, class CvSender, class... Env>
120120
using completions_t =
121121
__transform_completion_signatures_t<__completion_signatures_of_t<CvSender, Env...>,
122-
completion_signatures<set_error_t(std::exception_ptr)>,
122+
completion_signatures<set_error_t(cudaError_t)>,
123123
__mbind_front_q<_set_value_t, Fun>::template __f>;
124124
} // namespace _launch
125125

test/nvexec/launch.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <algorithm>
1818
#include <stdexec/execution.hpp>
1919
#include <test_common/catch2.hpp>
20+
#include <test_common/type_helpers.hpp>
2021

2122
#include "common.cuh"
2223
#include "nvexec/stream_context.cuh"
@@ -50,6 +51,16 @@ namespace
5051
return std::accumulate(input.begin(), input.end(), 0);
5152
}
5253

54+
TEST_CASE("nvexec launch advertises CUDA launch errors", "[cuda][stream][adaptors][launch]")
55+
{
56+
nvexec::stream_context stream{};
57+
58+
auto snd = STDEXEC::just() | STDEXEC::continues_on(stream.get_scheduler())
59+
| nvexec::launch([](cudaStream_t) {});
60+
61+
check_err_types<ex::__mset<cudaError_t>>(snd);
62+
}
63+
5364
TEST_CASE("nvexec launch executes on GPU", "[cuda][stream][adaptors][launch]")
5465
{
5566
thrust::device_vector<int> input(N, 0);

0 commit comments

Comments
 (0)