A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 15:45 UTC
[BUGFIX]fix CUDA OOM ERROR : invalid argument at cumem_allocator.cpp:119 (#35594)
Signed-off-by: xjx <493337577@qq.com>
xjx committed
Mar 16, 2026 at 23:10 UTC
18be11fd59cd3bf1082170ca638ebdfa384e7ed6
1 file changed
+8
-6
csrc/cumem_allocator.cpp
+8
-6
@@ -109,16 +109,18 @@ void create_and_map(unsigned long long device, ssize_t size, CUdeviceptr d_mem,
109
110
#ifndef USE_ROCM
111
int flag = 0;
112
- CUDA_CHECK(cuDeviceGetAttribute(
112
+ CUresult rdma_result = cuDeviceGetAttribute(
113
&flag, CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED,
114
- device));
115
- if (flag) { // support GPUDirect RDMA if possible
114
+ device);
115
+ if (rdma_result == CUDA_SUCCESS &&
116
+ flag) { // support GPUDirect RDMA if possible
117
prop.allocFlags.gpuDirectRDMACapable = 1;
118
}
119
int fab_flag = 0;
119
- CUDA_CHECK(cuDeviceGetAttribute(
120
- &fab_flag, CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED, device));
121
- if (fab_flag) { // support fabric handle if possible
120
+ CUresult fab_result = cuDeviceGetAttribute(
121
+ &fab_flag, CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED, device);
122
+ if (fab_result == CUDA_SUCCESS &&
123
+ fab_flag) { // support fabric handle if possible
124
prop.requestedHandleTypes = CU_MEM_HANDLE_TYPE_FABRIC;
125
}
126
#endif