Skip to content

Commit 4a117d5

Browse files
committed
accelerator/rocm: add sync of default stream
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 <Edgar.Gabriel@amd.com>
1 parent 6264853 commit 4a117d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

opal/mca/accelerator/rocm/accelerator_rocm_module.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,12 @@ static int mca_accelerator_rocm_memcpy(int dest_dev_id, int src_dev_id, void *de
390390
"error during synchronous copy\n");
391391
return OPAL_ERROR;
392392
}
393+
err = hipStreamSynchronize(0);
394+
if (hipSuccess != err ) {
395+
opal_output_verbose(10, opal_accelerator_base_framework.framework_output,
396+
"error synchronizing default stream after hipMemcpy\n");
397+
return OPAL_ERROR;
398+
}
393399
}
394400

395401
return OPAL_SUCCESS;

0 commit comments

Comments
 (0)