Skip to content

Commit bc7c0f4

Browse files
committed
Fix result checks
Signed-off-by: Michael Aziz <[email protected]>
1 parent b205652 commit bc7c0f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source/adapters/level_zero/usm.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ static ur_result_t USMDeviceAllocImpl(void **ResultPtr,
195195
auto Result = USMAllocationMakeResident(USMDeviceAllocationForceResidency,
196196
Context, Device, *ResultPtr, Size);
197197
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||
198-
Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY) {
198+
Result == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY) {
199199
return Result;
200200
}
201201
return UR_RESULT_SUCCESS;
@@ -232,7 +232,7 @@ static ur_result_t USMSharedAllocImpl(void **ResultPtr,
232232
auto Result = USMAllocationMakeResident(USMSharedAllocationForceResidency,
233233
Context, Device, *ResultPtr, Size);
234234
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||
235-
Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY) {
235+
Result == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY) {
236236
return Result;
237237
}
238238

@@ -258,7 +258,7 @@ static ur_result_t USMHostAllocImpl(void **ResultPtr,
258258
auto Result = USMAllocationMakeResident(USMHostAllocationForceResidency,
259259
Context, nullptr, *ResultPtr, Size);
260260
if (Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY ||
261-
Result == UR_RESULT_ERROR_OUT_OF_DEVICE_MEMORY) {
261+
Result == UR_RESULT_ERROR_OUT_OF_HOST_MEMORY) {
262262
return Result;
263263
}
264264
return UR_RESULT_SUCCESS;

0 commit comments

Comments
 (0)