Skip to content

[SYCL][CUDA] Reintroduce removing of size checks from USM allocations #11023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions sycl/plugins/unified_runtime/ur/adapters/cuda/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ urUSMHostAlloc(ur_context_handle_t hContext, const ur_usm_desc_t *pUSMDesc,
UR_ASSERT(!pUSMDesc ||
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
UR_RESULT_ERROR_INVALID_VALUE);
UR_ASSERT(size < hContext->DeviceID->getMaxAllocSize(),
UR_RESULT_ERROR_INVALID_USM_SIZE);

if (!hPool) {
return USMHostAllocImpl(ppMem, hContext, nullptr, size, alignment);
Expand All @@ -54,8 +52,6 @@ urUSMDeviceAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
UR_ASSERT(!pUSMDesc ||
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
UR_RESULT_ERROR_INVALID_VALUE);
UR_ASSERT(size <= hDevice->getMaxAllocSize(),
UR_RESULT_ERROR_INVALID_USM_SIZE);

if (!hPool) {
return USMDeviceAllocImpl(ppMem, hContext, hDevice, nullptr, size,
Expand All @@ -81,8 +77,6 @@ urUSMSharedAlloc(ur_context_handle_t hContext, ur_device_handle_t hDevice,
UR_ASSERT(!pUSMDesc ||
(alignment == 0 || ((alignment & (alignment - 1)) == 0)),
UR_RESULT_ERROR_INVALID_VALUE);
UR_ASSERT(size <= hDevice->getMaxAllocSize(),
UR_RESULT_ERROR_INVALID_USM_SIZE);

if (!hPool) {
return USMSharedAllocImpl(ppMem, hContext, hDevice, nullptr, nullptr, size,
Expand Down