Skip to content

Query whether the MMD supports buffer_location in shared/host USM allocations API calls #147

@zibaiwan

Description

@zibaiwan

In this #141, we pass the buffer location information from the OpenCL runtime to the MMD USM allocation APIs. However, there are some MMDs which don't support buffer_location property, and this caused the allocation fails on those MMDs.

For 2022.3 release, the solution is to only pass buffer_location property to the MMD when targeting simulation. The query can be done through acl_get_offline_device_user_setting, 'CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1' or 'get_msim_mmd_layer()'.

For 2023.0, we could probably add something to the aocl_mmd_offline_info_t in aocl_mmd.h. Runtime could query whether the mmd supports buffer_location and only pass the buffer_location property if the mmd supports it. We need to test whether this approach breaks the existing MMDs that don't support buffer_locaiton, and also test it on the supporting MMD (probably starts with the simulation mmd). This requires co-ordination with the MMD owner.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions