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