@@ -163,9 +163,18 @@ CL_API_ENTRY void *CL_API_CALL clHostMemAllocINTEL(
163
163
UNLOCK_BAIL_INFO (CL_OUT_OF_HOST_MEMORY, context, " Out of host memory" );
164
164
}
165
165
166
+ int use_offline_only;
167
+ acl_get_offline_device_user_setting (&use_offline_only);
168
+ mem_properties_t *properties_ptr;
169
+ if (use_offline_only == ACL_CONTEXT_MPSIM) {
170
+ properties_ptr = mmd_properties.data ();
171
+ } else {
172
+ properties_ptr = nullptr ;
173
+ }
174
+
166
175
int error = 0 ;
167
176
void *mem = acl_get_hal ()->host_alloc (devices, size, alignment,
168
- mmd_properties. data () , &error);
177
+ properties_ptr , &error);
169
178
if (error) {
170
179
acl_free (usm_alloc);
171
180
switch (error) {
@@ -449,9 +458,18 @@ clSharedMemAllocINTEL(cl_context context, cl_device_id device,
449
458
UNLOCK_BAIL_INFO (CL_OUT_OF_HOST_MEMORY, context, " Out of host memory" );
450
459
}
451
460
461
+ int use_offline_only;
462
+ acl_get_offline_device_user_setting (&use_offline_only);
463
+ mem_properties_t *properties_ptr;
464
+ if (use_offline_only == ACL_CONTEXT_MPSIM) {
465
+ properties_ptr = mmd_properties.data ();
466
+ } else {
467
+ properties_ptr = nullptr ;
468
+ }
469
+
452
470
int error;
453
471
void *mem = acl_get_hal ()->shared_alloc (device, size, alignment,
454
- mmd_properties. data () , &error);
472
+ properties_ptr , &error);
455
473
if (mem == NULL ) {
456
474
acl_free (usm_alloc);
457
475
switch (error) {
0 commit comments