Skip to content

Commit 9f48a14

Browse files
UCT/CUDA_IPC: address feedback
1 parent 9a0bef0 commit 9f48a14

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/uct/cuda/cuda_ipc/cuda_ipc_cache.c

+10-10
Original file line numberDiff line numberDiff line change
@@ -339,18 +339,18 @@ static ucs_status_t uct_cuda_ipc_open_memhandle(uct_cuda_ipc_rkey_t *key,
339339
ucs_trace("key handle type %u", key->ph.handle_type);
340340

341341
switch(key->ph.handle_type) {
342-
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_LEGACY:
343-
return uct_cuda_ipc_open_memhandle_legacy(key->ph.handle.legacy,
344-
mapped_addr);
342+
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_LEGACY:
343+
return uct_cuda_ipc_open_memhandle_legacy(key->ph.handle.legacy,
344+
mapped_addr);
345345
#if HAVE_CUDA_FABRIC
346-
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_VMM:
347-
return uct_cuda_ipc_open_memhandle_vmm(key, mapped_addr);
348-
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_MEMPOOL:
349-
return uct_cuda_ipc_open_memhandle_mempool(key, mapped_addr);
346+
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_VMM:
347+
return uct_cuda_ipc_open_memhandle_vmm(key, mapped_addr);
348+
case UCT_CUDA_IPC_KEY_HANDLE_TYPE_MEMPOOL:
349+
return uct_cuda_ipc_open_memhandle_mempool(key, mapped_addr);
350350
#endif
351-
default:
352-
ucs_error("unsupported key handle type");
353-
return UCS_ERR_INVALID_PARAM;
351+
default:
352+
ucs_error("unsupported key handle type");
353+
return UCS_ERR_INVALID_PARAM;
354354
}
355355
}
356356

src/uct/cuda/cuda_ipc/cuda_ipc_md.c

-2
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ uct_cuda_ipc_mem_add_reg(void *addr, uct_cuda_ipc_memh_t *memh,
126126
return UCS_ERR_NO_MEMORY;
127127
}
128128

129-
key->ph.handle_type = UCT_CUDA_IPC_KEY_HANDLE_TYPE_ERROR;
130-
131129
UCT_CUDADRV_FUNC_LOG_ERR(cuMemGetAddressRange(&key->d_bptr, &key->b_len,
132130
(CUdeviceptr)addr));
133131

src/uct/cuda/cuda_ipc/cuda_ipc_md.h

+2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@
1717
typedef enum uct_cuda_ipc_key_handle {
1818
UCT_CUDA_IPC_KEY_HANDLE_TYPE_ERROR = 0,
1919
UCT_CUDA_IPC_KEY_HANDLE_TYPE_LEGACY, /* cudaMalloc memory */
20+
#if HAVE_CUDA_FABRIC
2021
UCT_CUDA_IPC_KEY_HANDLE_TYPE_VMM, /* cuMemCreate memory */
2122
UCT_CUDA_IPC_KEY_HANDLE_TYPE_MEMPOOL /* cudaMallocAsync memory */
23+
#endif
2224
} uct_cuda_ipc_key_handle_t;
2325

2426

0 commit comments

Comments
 (0)