Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion benchmarks/graph/benchmark_straight_line.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class StraightLineBenchmark : public benchmarks::BenchmarkBase
public:
//! We need to create @c Kokkos objects in the @ref SetUp, not using the constructor or in-class default member initializers.
void SetUp(const ::benchmark::State&) override {
this->exec = Kokkos::Experimental::partition_space(execution_space{}, 1)[0];
this->exec = Kokkos::Experimental::partition_space(execution_space{}, 1).at(0);
this->data = view_t(Kokkos::view_alloc(*exec));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/exec/adaptors/test_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace tests::stdexec::adaptors {

//! @test Simple test for @c exec::split.
TEST(stdexec, split) {
exec::static_thread_pool pool{2};
exec::static_thread_pool pool{2}; // NOLINT(misc-const-correctness)

::stdexec::scheduler auto scheduler = pool.get_scheduler();

Expand Down
2 changes: 1 addition & 1 deletion tests/graph/complex_dag/test_stdexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TEST(graph, complex_dag_stdexec)
using view_t = Kokkos::View<int[size], memory_space>;

//! Get some execution context.
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

//! Initialize the data.
const view_t data(Kokkos::view_alloc("data"));
Expand Down
2 changes: 1 addition & 1 deletion tests/graph/runtime/test_stdexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ TEST_P(GraphTest, runtime_stdexec)
const auto add_C = this->GetParam().at(1);

//! Get some execution context.
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

//! Initialize the data.
const view_t data(Kokkos::view_alloc("data"));
Expand Down
2 changes: 1 addition & 1 deletion tests/graph/while/test_while.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class WhileTest : public ::testing::Test
public:
void SetUp() override
{
this->exec = Kokkos::Experimental::partition_space(Kokkos::Cuda{}, 1)[0];
this->exec = Kokkos::Experimental::partition_space(Kokkos::Cuda{}, 1).at(0);
this->data = data_t(Kokkos::view_alloc(*exec, "data"), size);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/kokkos_ext/execution_space/test_fork_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ForkJoinTest
TEST_F(ForkJoinTest, diamond) {
const view_s_t data(Kokkos::view_alloc("data - shared space"));

::exec::static_thread_pool pool{4};
::exec::static_thread_pool pool{4}; // NOLINT(misc-const-correctness)
const context_t esc{exec};

auto chain =
Expand Down
8 changes: 4 additions & 4 deletions tests/kokkos_ext/execution_space/test_inter_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ TEST_F(InterOpTest, transition_to_static_thread_pool) {

const context_t esc{exec};

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

SHOW_EXEC_SPACE_ID(exec)

Expand Down Expand Up @@ -182,7 +182,7 @@ TEST_F(InterOpTest, transition_from_static_thread_pool) {

const context_t esc{exec};

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

SHOW_EXEC_SPACE_ID(exec)

Expand Down Expand Up @@ -215,7 +215,7 @@ TEST_F(InterOpTest, transition_from_static_thread_pool_and_back) {

const context_t esc{exec};

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

SHOW_EXEC_SPACE_ID(exec)

Expand Down Expand Up @@ -251,7 +251,7 @@ TEST_F(InterOpTest, transition_to_static_thread_pool_and_back) {

const context_t esc{exec};

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

SHOW_EXEC_SPACE_ID(exec)

Expand Down
2 changes: 1 addition & 1 deletion tests/kokkos_ext/execution_space/test_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TEST_F(SplitTest, split_and_sync_wait) {
TEST_F(SplitTest, within) {
const view_s_t data(Kokkos::view_alloc(exec, "data - shared space"));

::exec::static_thread_pool pool{4};
::exec::static_thread_pool pool{4}; // NOLINT(misc-const-correctness)
const context_t esc{exec};

::stdexec::sender auto fork = ::stdexec::schedule(pool.get_scheduler()) | ::exec::split();
Expand Down
6 changes: 3 additions & 3 deletions tests/kokkos_ext/graph/test_inter_op.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ TEST_F(InterOpTest, transition_to_static_thread_pool) {
const context_t esc{exec};
SHOW_EXEC_SPACE_ID(exec)

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto chain = ::stdexec::schedule(esc.get_scheduler())
| ::stdexec::then(
Expand Down Expand Up @@ -187,7 +187,7 @@ TEST_F(InterOpTest, transition_from_static_thread_pool) {
const context_t esc{exec};
SHOW_EXEC_SPACE_ID(exec)

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto chain = ::stdexec::schedule(pool.get_scheduler())
| ::stdexec::then(
Expand Down Expand Up @@ -221,7 +221,7 @@ TEST_F(InterOpTest, transition_from_static_thread_pool_and_back) {
const context_t esc{exec};
SHOW_EXEC_SPACE_ID(exec)

::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto chain = ::stdexec::schedule(pool.get_scheduler())
| ::stdexec::then(
Expand Down
1 change: 1 addition & 0 deletions tests/native/test_conditional_if.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ TEST_P(cuda, conditional_if)
graph_exec.submit(stream);

const auto mirror = data.get_host_copy(stream);
stream.fence();

ASSERT_EQ(mirror.at(0), this->GetParam() ? 1 : 0);

Expand Down
1 change: 1 addition & 0 deletions tests/native/test_conditional_while.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ TEST(cuda, conditional_while)
graph_exec.submit(stream);

const auto mirror = data.get_host_copy(stream);
stream.fence();

EXPECT_EQ(mirror.at(0), 42);

Expand Down
1 change: 1 addition & 0 deletions tests/native/test_diamond.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ TEST(cuda, diamond_graph)
graph_exec.submit(stream);

const auto mirror = data.get_host_copy(stream);
stream.fence();

ASSERT_THAT(mirror, ::testing::ElementsAre(4));

Expand Down
1 change: 1 addition & 0 deletions tests/native/test_memcpy_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ TEST(cuda, memcpy_node)
//! Check the values in @c dst and @c src are identical (and as expected).
const auto src_h = src.get_host_copy(stream);
const auto dst_h = dst.get_host_copy(stream);
stream.fence();

std::vector<scalar_t> expected(size);
std::iota(expected.begin(), expected.end(), 0);
Expand Down
5 changes: 4 additions & 1 deletion tests/native/test_subgraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ TEST(cuda, subgraph)
graph_exec.submit(stream);

//! Check results.
ASSERT_EQ(data.get_host_copy(stream), (std::vector<value_t>{5, 5, 4}));
const auto mirror = data.get_host_copy(stream);
stream.fence();

ASSERT_EQ(mirror, (std::vector<value_t>{5, 5, 4}));
}

} // namespace tests::cuda
8 changes: 4 additions & 4 deletions tests/stdexec/test_check_scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ TEST(check_scheduler, default) {

//! @test @c exec::static_thread_pool scheduler.
TEST(check_scheduler, static_thread_pool) {
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto chain = ::stdexec::schedule(pool.get_scheduler()) | check_scheduler<static_thread_pool_scheduler_t>()
| THEN_SHOW_ID;
Expand All @@ -50,7 +50,7 @@ TEST(check_scheduler, static_thread_pool) {
* See also https://github.com/NVIDIA/stdexec/issues/1736#issuecomment-3720622409.
*/
TEST(check_scheduler, split_when_all_no_forward) {
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto fork = ::stdexec::schedule(pool.get_scheduler()) | check_scheduler<static_thread_pool_scheduler_t>()
| THEN_SHOW_ID | ::exec::split();
Expand All @@ -68,7 +68,7 @@ TEST(check_scheduler, split_when_all_no_forward) {
* See also https://github.com/NVIDIA/stdexec/issues/1736#issuecomment-3720622409.
*/
TEST(check_scheduler, split_transfer_when_all_no_forward) {
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto fork = ::stdexec::schedule(pool.get_scheduler()) | check_scheduler<static_thread_pool_scheduler_t>()
| THEN_SHOW_ID | ::exec::split();
Expand All @@ -83,7 +83,7 @@ TEST(check_scheduler, split_transfer_when_all_no_forward) {

//! @test Multiple splits.
TEST(check_scheduler, multiple_splits) {
::exec::static_thread_pool pool{1};
::exec::static_thread_pool pool{1}; // NOLINT(misc-const-correctness)

auto fork_A = ::stdexec::schedule(pool.get_scheduler()) | check_scheduler<static_thread_pool_scheduler_t>()
| THEN_SHOW_ID | ::exec::split();
Expand Down
2 changes: 1 addition & 1 deletion tests/stdexec/test_value_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace tests::stdexec {
TEST(ValueReceiver, int) {
::stdexec::sender auto sndr = ::stdexec::just(int{42}) | ::stdexec::continues_on(::stdexec::inline_scheduler{});

int placeholder = 0;
int placeholder = 0; // NOLINT(misc-const-correctness)

auto opstate = ::stdexec::connect(sndr, ValueReceiver<int>{.value = std::addressof(placeholder)});

Expand Down
Loading