Skip to content

Commit 77eee0e

Browse files
authored
fix gpuAlloc error propagation
1 parent 7e73fee commit 77eee0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

driverapi/src/librecuda.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,9 @@ libreCudaStatus_t libreCuMemAlloc(void **pDevicePointer, size_t bytesize, bool m
737737
LIBRECUDA_ENSURE_CTX_VALID();
738738
NvU64 va_address{}; {
739739
bool hugePages = bytesize > (16 << 20);
740-
gpuAlloc(current_ctx, bytesize, false, hugePages, mapToCpu, 0, &va_address);
740+
LIBRECUDA_ERR_PROPAGATE(
741+
gpuAlloc(current_ctx, bytesize, false, hugePages, mapToCpu, 0, &va_address)
742+
);
741743
}
742744
*pDevicePointer = reinterpret_cast<void *>(va_address);
743745
LIBRECUDA_SUCCEED();

0 commit comments

Comments
 (0)