From f65ed0228eeaf9c0f1a43578b776467516521f88 Mon Sep 17 00:00:00 2001 From: Mark Harris Date: Wed, 9 Jun 2021 03:54:09 +1000 Subject: [PATCH] Pass stream to device_scalar::value() calls. (#259) In comms/test.hpp `device_scalar::value` was not being passed an explicit stream, which means that the default stream was being synced. rapidsai/rmm#789 will remove the default from this parameter, and would have therefore broken the RAFT build. So this PR fixes the oversynchronization and ensures RAFT will build after the RMM PR is merged. Note this PR includes the cmake changes from #258 (just so I could build locally). Once #258 is merged this PR's changes will be simplified. Authors: - Mark Harris (https://github.com/harrism) Approvers: - Dante Gama Dessavre (https://github.com/dantegd) - Chuck Hastings (https://github.com/ChuckHastings) URL: https://github.com/rapidsai/raft/pull/259 --- cpp/include/raft/comms/test.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/include/raft/comms/test.hpp b/cpp/include/raft/comms/test.hpp index 2ba9e406be..4e95c4eef0 100644 --- a/cpp/include/raft/comms/test.hpp +++ b/cpp/include/raft/comms/test.hpp @@ -378,7 +378,7 @@ bool test_pointToPoint_device_send_or_recv(const handle_t &h, int numTrials) { communicator.sync_stream(stream); - if (!sender && received_data.value() != rank - 1) { + if (!sender && received_data.value(stream) != rank - 1) { ret = false; } @@ -424,8 +424,8 @@ bool test_pointToPoint_device_sendrecv(const handle_t &h, int numTrials) { communicator.sync_stream(stream); - if (((rank % 2 == 0) && (received_data.value() != rank + 1)) || - ((rank % 2 == 1) && (received_data.value() != rank - 1))) { + if (((rank % 2 == 0) && (received_data.value(stream) != rank + 1)) || + ((rank % 2 == 1) && (received_data.value(stream) != rank - 1))) { ret = false; }