Skip to content

Commit

Permalink
accelerator/rocm: add sync of default stream
Browse files Browse the repository at this point in the history
when using the blocking hipMemcpy version of the _memcpy
operation we seem to need a synchronization of the default stream to
ensure completeness in some cases.

Signed-off-by: Edgar Gabriel <[email protected]>
  • Loading branch information
edgargabriel committed Dec 9, 2024
1 parent 6264853 commit 4a117d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions opal/mca/accelerator/rocm/accelerator_rocm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,12 @@ static int mca_accelerator_rocm_memcpy(int dest_dev_id, int src_dev_id, void *de
"error during synchronous copy\n");
return OPAL_ERROR;
}
err = hipStreamSynchronize(0);
if (hipSuccess != err ) {
opal_output_verbose(10, opal_accelerator_base_framework.framework_output,
"error synchronizing default stream after hipMemcpy\n");
return OPAL_ERROR;
}
}

return OPAL_SUCCESS;
Expand Down

0 comments on commit 4a117d5

Please sign in to comment.