Skip to content

Commit

Permalink
Pass stream to device_scalar::value() calls. (#259)
Browse files Browse the repository at this point in the history
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: #259
  • Loading branch information
harrism authored Jun 8, 2021
1 parent f9b3c49 commit f65ed02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cpp/include/raft/comms/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f65ed02

Please sign in to comment.