mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 18:06:32 +08:00
feature: define default descriptors for counter based event and USM
user can use default descriptor to simplify creation Related-To: NEO-14560 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
316ef0ac74
commit
2661fd9522
@@ -32,27 +32,6 @@ const ze_command_queue_desc_t commandQueueDesc = {
|
||||
.mode = ZE_COMMAND_QUEUE_MODE_ASYNCHRONOUS,
|
||||
.priority = ZE_COMMAND_QUEUE_PRIORITY_NORMAL,
|
||||
};
|
||||
|
||||
const ze_device_mem_alloc_desc_t deviceMemDesc = {
|
||||
.stype = ze_structure_type_t::ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC,
|
||||
.pNext = nullptr,
|
||||
.flags = static_cast<ze_device_mem_alloc_flags_t>(ZE_DEVICE_MEM_ALLOC_FLAG_BIAS_CACHED),
|
||||
.ordinal = 0};
|
||||
|
||||
const ze_host_mem_alloc_desc_t hostMemDesc = {
|
||||
.stype = ze_structure_type_t::ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC,
|
||||
.pNext = nullptr,
|
||||
.flags = static_cast<ze_host_mem_alloc_flags_t>(ZE_HOST_MEM_ALLOC_FLAG_BIAS_CACHED | ZE_HOST_MEM_ALLOC_FLAG_BIAS_INITIAL_PLACEMENT)};
|
||||
|
||||
const zex_counter_based_event_desc_t counterBasedEventDesc = {
|
||||
.stype = ZEX_STRUCTURE_COUNTER_BASED_EVENT_DESC,
|
||||
.pNext = nullptr,
|
||||
.flags = static_cast<zex_counter_based_event_exp_flags_t>(
|
||||
ZEX_COUNTER_BASED_EVENT_FLAG_IMMEDIATE |
|
||||
ZEX_COUNTER_BASED_EVENT_FLAG_NON_IMMEDIATE |
|
||||
ZEX_COUNTER_BASED_EVENT_FLAG_HOST_VISIBLE),
|
||||
.signalScope = static_cast<ze_event_scope_flags_t>(ZE_EVENT_SCOPE_FLAG_HOST),
|
||||
.waitScope = static_cast<ze_event_scope_flags_t>(ZE_EVENT_SCOPE_FLAG_DEVICE)};
|
||||
} // namespace DefaultDescriptors
|
||||
|
||||
} // namespace L0
|
||||
@@ -14,8 +14,5 @@ namespace L0 {
|
||||
namespace DefaultDescriptors {
|
||||
extern const ze_context_desc_t contextDesc;
|
||||
extern const ze_command_queue_desc_t commandQueueDesc;
|
||||
extern const ze_device_mem_alloc_desc_t deviceMemDesc;
|
||||
extern const ze_host_mem_alloc_desc_t hostMemDesc;
|
||||
extern const zex_counter_based_event_desc_t counterBasedEventDesc;
|
||||
} // namespace DefaultDescriptors
|
||||
} // namespace L0
|
||||
Reference in New Issue
Block a user