Skip to content

Commit a9a9f7f

Browse files
[SYCL][CUDA] Reintroduce removing of size checks from USM allocations (#11023)
Resolve same issue fixed in [PR](#10034) Co-authored-by: Omar Ahmed <omar.ahmed@codeplay.com>
1 parent fe813f3 commit a9a9f7f

File tree

1 file changed

+0
-6
lines changed
  • sycl/plugins/unified_runtime/ur/adapters/cuda

1 file changed

+0
-6
lines changed

sycl/plugins/unified_runtime/ur/adapters/cuda/usm.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ urUSMHostAlloc(ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc,
2828
UR_ASSERT(!pUSMDesc ||
2929
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
3030
UR_RESULT_ERROR_INVALID_VALUE);
31-
UR_ASSERT(size < hContext->DeviceID->getMaxAllocSize(),
32-
UR_RESULT_ERROR_INVALID_USM_SIZE);
3331

3432
if (!hPool) {
3533
return USMHostAllocImpl(ppMem, hContext, nullptr, size, alignment);
@@ -54,8 +52,6 @@ urUSMDeviceAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
5452
UR_ASSERT(!pUSMDesc ||
5553
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
5654
UR_RESULT_ERROR_INVALID_VALUE);
57-
UR_ASSERT(size <= hDevice->getMaxAllocSize(),
58-
UR_RESULT_ERROR_INVALID_USM_SIZE);
5955

6056
if (!hPool) {
6157
return USMDeviceAllocImpl(ppMem, hContext, hDevice, nullptr, size,
@@ -81,8 +77,6 @@ urUSMSharedAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
8177
UR_ASSERT(!pUSMDesc ||
8278
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
8379
UR_RESULT_ERROR_INVALID_VALUE);
84-
UR_ASSERT(size <= hDevice->getMaxAllocSize(),
85-
UR_RESULT_ERROR_INVALID_USM_SIZE);
8680

8781
if (!hPool) {
8882
return USMSharedAllocImpl(ppMem, hContext, hDevice, nullptr, nullptr, size,

0 commit comments

Comments
 (0)