Skip to content

Commit

Permalink
[runtime][hip] Do not error when peered memory access already enabled (
Browse files Browse the repository at this point in the history
…iree-org#19582)

This fixes the error

```
ALREADY_EXISTS; HIP driver error 'hipErrorPeerAccessAlreadyEnabled' (704): peer access is already enabled; creating device 'hip'
```

This should not be treated as an error.

Signed-off-by: Boian Petkantchin <boian.petkantchin@amd.com>
  • Loading branch information
sogartar authored Jan 2, 2025
1 parent c203e6b commit 88848b4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions runtime/src/iree/hal/drivers/hip/hip_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,11 @@ iree_status_t iree_hal_hip_device_create(
if (j == device->devices[i].hip_device) {
continue;
}
status =
IREE_HIP_CALL_TO_STATUS(symbols, hipDeviceEnablePeerAccess(j, 0));
hipError_t hip_error = symbols->hipDeviceEnablePeerAccess(j, 0);
if (hip_error == hipErrorPeerAccessAlreadyEnabled) {
continue;
}
status = IREE_HIP_RESULT_TO_STATUS(symbols, hip_error);
}
}
}
Expand Down

0 comments on commit 88848b4

Please sign in to comment.