Skip to content

Commit

Permalink
Fix for fused Allgatherv
Browse files Browse the repository at this point in the history
Signed-off-by: Yana Shchyokotova <yana.shchyokotova@intel.com>
  • Loading branch information
shirosankaku committed May 17, 2019
1 parent 0921a49 commit d49a3de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion horovod/common/ops/mlsl_operations.cc
Expand Up @@ -159,7 +159,7 @@ Status MLSLAllgather::Execute(std::vector<TensorTableEntry>& entries, const Resp
}

global_state_->timeline.ActivityStartAll(entries, MLSL_ALLGATHER);
auto mlsl_req = mlsl_context_->dist->AllGatherv((void*)sendbuf,
auto mlsl_req = mlsl_context_->dist->AllGatherv(sendbuf != nullptr ? (void*)sendbuf : buffer_data,
total_num_elements * element_size,
buffer_data, rcounts,
MLSL::DT_BYTE, MLSL::GT_DATA);
Expand Down
5 changes: 4 additions & 1 deletion test/test_timeline.py
Expand Up @@ -44,7 +44,10 @@ def test_timeline(self):
hvd.init()

# Perform a simple allreduce operation
hvd.allreduce(torch.tensor([1, 2, 3], dtype=torch.float32), name='test_allreduce')
if 'MLSL_ROOT' in os.environ:
hvd.allreduce(torch.tensor([1, 2, 3], dtype=torch.float32), name='test_allreduce')
else:
hvd.allreduce(torch.tensor([1, 2, 3]), name='test_allreduce')

# Wait for it to register in the timeline.
time.sleep(0.1)
Expand Down

0 comments on commit d49a3de

Please sign in to comment.