mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 16:48:45 +08:00
Optimize event creation time.
Prevent accessing local memory from the host. Create an array on stack with desired value and pass it to filling function. 175x faster call execution for scenario with profiling and device events. Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
63f406a58c
commit
08d361260e
@@ -164,7 +164,15 @@ ze_result_t EventImp<TagSizeT>::hostEventSetValueTimestamps(TagSizeT eventVal) {
|
||||
baseAddr += singlePacketSize;
|
||||
}
|
||||
}
|
||||
assignKernelEventCompletionData(hostAddress);
|
||||
|
||||
const auto dataSize = 4u * EventPacketsCount::maxKernelSplit * NEO::TimestampPacketSizeControl::preferredPacketCount;
|
||||
TagSizeT tagValues[dataSize];
|
||||
|
||||
for (uint32_t index = 0u; index < dataSize; index++) {
|
||||
tagValues[index] = eventVal;
|
||||
}
|
||||
|
||||
assignKernelEventCompletionData(tagValues);
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user