Skip to content

Commit 10d785d

Browse files
authored
Merge pull request #9717 from brminich/uct/cuda_ipc_fix_rkey_unpack
UCT/CUDA: Return unreachable from rkey unpack in case of error - v1.16.x
2 parents 6ec84a7 + 9cdac44 commit 10d785d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/uct/cuda/cuda_ipc/cuda_ipc_md.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,12 @@ static ucs_status_t uct_cuda_ipc_is_peer_accessible(uct_cuda_ipc_component_t *md
209209
* stream sequentialization */
210210
rkey->dev_num = peer_idx;
211211

212-
UCT_CUDA_IPC_GET_DEVICE(this_device);
213212
UCT_CUDA_IPC_DEVICE_GET_COUNT(num_devices);
213+
if (UCT_CUDADRV_FUNC_LOG_DEBUG(cuCtxGetDevice(&this_device)) != UCS_OK) {
214+
status = UCS_ERR_UNREACHABLE;
215+
goto err;
216+
}
217+
214218

215219
accessible = &mdc->md->peer_accessible_cache[peer_idx * num_devices + this_device];
216220
if (*accessible == UCS_TRY) { /* unchecked, add to cache */

0 commit comments

Comments
 (0)