Skip to content

Commit 48c506b

Browse files
committed
added rocm7 support to EnablePeerAccess
1 parent 7775dd0 commit 48c506b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xla/stream_executor/rocm/rocm_executor.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,13 @@ absl::Status EnablePeerAccess(Context* from, Context* to) {
374374
hipError_t result =
375375
wrap::hipDeviceEnablePeerAccess(to->device_ordinal(), 0 /* = flags */);
376376

377-
if (result != hipSuccess && result != hipErrorPeerAccessAlreadyEnabled) {
377+
if (result == hipErrorPeerAccessAlreadyEnabled) {
378+
hipGetLastError();
379+
} else if (result != hipSuccess) {
378380
return absl::InternalError(
379381
absl::StrFormat("failed to enable peer access from %d to %d: %s",
380382
from->device_ordinal(), to->device_ordinal(),
381-
ToString(result).c_str()));
383+
hipGetErrorString(result)));
382384
}
383385

384386
return absl::OkStatus();

0 commit comments

Comments
 (0)