@@ -192,9 +192,8 @@ static ur_result_t USMDeviceAllocImpl(void **ResultPtr,
192
192
reinterpret_cast <std::uintptr_t >(*ResultPtr) % Alignment == 0 ,
193
193
UR_RESULT_ERROR_INVALID_VALUE);
194
194
195
- USMAllocationMakeResident (USMDeviceAllocationForceResidency, Context, Device,
196
- *ResultPtr, Size);
197
- return UR_RESULT_SUCCESS;
195
+ return USMAllocationMakeResident (USMDeviceAllocationForceResidency, Context,
196
+ Device, *ResultPtr, Size);
198
197
}
199
198
200
199
static ur_result_t USMSharedAllocImpl (void **ResultPtr,
@@ -225,11 +224,9 @@ static ur_result_t USMSharedAllocImpl(void **ResultPtr,
225
224
reinterpret_cast <std::uintptr_t >(*ResultPtr) % Alignment == 0 ,
226
225
UR_RESULT_ERROR_INVALID_VALUE);
227
226
228
- USMAllocationMakeResident (USMSharedAllocationForceResidency, Context, Device,
229
- *ResultPtr, Size);
230
-
231
227
// TODO: Handle PI_MEM_ALLOC_DEVICE_READ_ONLY.
232
- return UR_RESULT_SUCCESS;
228
+ return USMAllocationMakeResident (USMSharedAllocationForceResidency, Context,
229
+ Device, *ResultPtr, Size);
233
230
}
234
231
235
232
static ur_result_t USMHostAllocImpl (void **ResultPtr,
@@ -247,9 +244,8 @@ static ur_result_t USMHostAllocImpl(void **ResultPtr,
247
244
reinterpret_cast <std::uintptr_t >(*ResultPtr) % Alignment == 0 ,
248
245
UR_RESULT_ERROR_INVALID_VALUE);
249
246
250
- USMAllocationMakeResident (USMHostAllocationForceResidency, Context, nullptr ,
251
- *ResultPtr, Size);
252
- return UR_RESULT_SUCCESS;
247
+ return USMAllocationMakeResident (USMHostAllocationForceResidency, Context,
248
+ nullptr , *ResultPtr, Size);
253
249
}
254
250
255
251
UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc (
0 commit comments