Skip to content

Commit

Permalink
Fix rebase errors
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Nov 8, 2023
1 parent 7bb4b95 commit d1382c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions opal/mca/accelerator/rocm/accelerator_rocm_component.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ size_t opal_accelerator_rocm_memcpyH2D_limit=1048576;
/* Initialization lock for lazy rocm initialization */
static opal_mutex_t accelerator_rocm_init_lock;
static bool accelerator_rocm_init_complete = false;
static int checkmem;

hipStream_t *opal_accelerator_rocm_MemcpyStream = NULL;

Expand Down Expand Up @@ -171,6 +170,7 @@ static int accelerator_rocm_component_register(void)

int opal_accelerator_rocm_lazy_init()
{
int prio_hi, prio_lo;
int err = OPAL_SUCCESS;

/* Double checked locking to avoid having to
Expand All @@ -191,7 +191,7 @@ int opal_accelerator_rocm_lazy_init()
/* Create stream for use in cuMemcpyAsync synchronous copies */
hipStream_t memcpy_stream;
err = hipStreamCreate(&memcpy_stream);
if (OPAL_UNLIKELY(result != hipSuccess)) {
if (OPAL_UNLIKELY(err != hipSuccess)) {
opal_show_help("help-accelerator-rocm.txt", "hipStreamCreateWithFlags failed", true,
OPAL_PROC_MY_HOSTNAME, err);
goto out;
Expand Down
10 changes: 5 additions & 5 deletions opal/mca/accelerator/rocm/accelerator_rocm_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ static int mca_accelerator_rocm_check_addr (const void *addr, int *dev_id, uint6

static int mca_accelerator_rocm_get_default_stream(int dev_id, opal_accelerator_stream_t **stream)
{
int delayed_init = opal_accelerator_rocm_delayed_init();
int delayed_init = opal_accelerator_rocm_lazy_init();
if (OPAL_UNLIKELY(0 != delayed_init)) {
return delayed_init;
}
*stream = &opal_accelerator_rocm_default_stream;
*stream = &opal_accelerator_rocm_default_stream.base;
return OPAL_SUCCESS;
}

Expand Down Expand Up @@ -359,7 +359,7 @@ static int mca_accelerator_rocm_memmove_async(int dest_dev_id, int src_dev_id, v
hipError_t result;
void *ptr;

int delayed_init = opal_accelerator_rocm_delayed_init();
int delayed_init = opal_accelerator_rocm_lazy_init();
if (OPAL_UNLIKELY(0 != delayed_init)) {
return delayed_init;
}
Expand Down Expand Up @@ -649,7 +649,7 @@ static int mca_accelerator_rocm_mem_alloc_stream(
//#if HIP_VERSION >= ??? //TODO
hipError_t result;

int delayed_init = opal_accelerator_rocm_delayed_init();
int delayed_init = opal_accelerator_rocm_lazy_init();
if (OPAL_UNLIKELY(0 != delayed_init)) {
return delayed_init;
}
Expand Down Expand Up @@ -734,7 +734,7 @@ static int mca_accelerator_rocm_get_num_devices(int *num_devices)

static int mca_accelerator_rocm_get_mem_bw(int device, float *bw)
{
int delayed_init = opal_accelerator_rocm_delayed_init();
int delayed_init = opal_accelerator_rocm_lazy_init();
if (OPAL_UNLIKELY(0 != delayed_init)) {
return delayed_init;
}
Expand Down

0 comments on commit d1382c3

Please sign in to comment.