Skip to content

Commit cbc2d03

Browse files
committed
fixup! Only pass buffer location property if in simulation environment
1 parent 31fc4a6 commit cbc2d03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/acl_usm.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@ CL_API_ENTRY void *CL_API_CALL clHostMemAllocINTEL(
168168
}
169169

170170
int error = 0;
171-
void *mem = acl_get_hal()->host_alloc(devices, size, alignment,
172-
mmd_properties.data(), &error);
171+
void *mem = acl_get_hal()->host_alloc(
172+
devices, size, alignment,
173+
mmd_properties[0] ? mmd_properties.data() : nullptr, &error);
173174
if (error) {
174175
acl_free(usm_alloc);
175176
switch (error) {
@@ -458,8 +459,9 @@ clSharedMemAllocINTEL(cl_context context, cl_device_id device,
458459
}
459460

460461
int error;
461-
void *mem = acl_get_hal()->shared_alloc(device, size, alignment,
462-
mmd_properties.data(), &error);
462+
void *mem = acl_get_hal()->shared_alloc(
463+
device, size, alignment,
464+
mmd_properties[0] ? mmd_properties.data() : nullptr, &error);
463465
if (mem == NULL) {
464466
acl_free(usm_alloc);
465467
switch (error) {

0 commit comments

Comments
 (0)