Skip to content

Commit

Permalink
Address a corner case when establishing p2p access (#2457)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Besard <[email protected]>
  • Loading branch information
findmyway and maleadt authored Aug 8, 2024
1 parent 763164d commit 69043ee
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/cudadrv/context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,13 @@ function maybe_enable_peer_access(src::CuDevice, dst::CuDevice)
enable_peer_access(context(dst))
peer_access[][src_idx, dst_idx] = 1
catch err
@warn "Enabling peer-to-peer access between $src and $dst failed; please file an issue." exception=(err,catch_backtrace())
peer_access[][src_idx, dst_idx] = -1
if err.code == CUDA.CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED
@warn "Peer-to-peer access between $src and $dst was unexpectedly already enabled"
CUDA.peer_access[][src_idx, dst_idx] = 1
else
@warn "Enabling peer-to-peer access between $src and $dst failed; please file an issue." exception=(err,catch_backtrace())
CUDA.peer_access[][src_idx, dst_idx] = -1
end
end
end
else
Expand Down

0 comments on commit 69043ee

Please sign in to comment.