fix: add profiling data to host signalled CB Event

Related-To: NEO-11378

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2024-05-10 09:22:13 +00:00
committed by Compute-Runtime-Automation
parent 6a24610ed1
commit 536698d276
15 changed files with 91 additions and 50 deletions

View File

@@ -80,7 +80,7 @@ struct EventDescriptor {
struct Event : _ze_event_handle_t {
virtual ~Event() = default;
virtual ze_result_t destroy();
virtual ze_result_t hostSignal() = 0;
virtual ze_result_t hostSignal(bool allowCounterBased) = 0;
virtual ze_result_t hostSynchronize(uint64_t timeout) = 0;
virtual ze_result_t queryStatus() = 0;
virtual ze_result_t reset() = 0;

View File

@@ -30,7 +30,7 @@ struct EventImp : public Event {
~EventImp() override {}
ze_result_t hostSignal() override;
ze_result_t hostSignal(bool allowCounterBased) override;
ze_result_t hostSynchronize(uint64_t timeout) override;
@@ -67,7 +67,7 @@ struct EventImp : public Event {
ze_result_t queryCounterBasedEventStatus();
void handleSuccessfulHostSynchronization();
MOCKABLE_VIRTUAL ze_result_t hostEventSetValue(TagSizeT eventValue);
ze_result_t hostEventSetValueTimestamps(TagSizeT eventVal);
MOCKABLE_VIRTUAL ze_result_t hostEventSetValueTimestamps(TagSizeT eventVal);
MOCKABLE_VIRTUAL void assignKernelEventCompletionData(void *address);
void setRemainingPackets(TagSizeT eventVal, uint64_t nextPacketGpuVa, void *nextPacketAddress, uint32_t packetsAlreadySet);
void getSynchronizedKernelTimestamps(ze_synchronized_timestamp_result_ext_t *pSynchronizedTimestampsBuffer,

View File

@@ -496,12 +496,17 @@ ze_result_t EventImp<TagSizeT>::hostEventSetValue(TagSizeT eventVal) {
}
template <typename TagSizeT>
ze_result_t EventImp<TagSizeT>::hostSignal() {
if (this->isCounterBased()) {
ze_result_t EventImp<TagSizeT>::hostSignal(bool allowCounterBased) {
if (!allowCounterBased && this->isCounterBased()) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
auto status = hostEventSetValue(Event::STATE_SIGNALED);
ze_result_t status = ZE_RESULT_SUCCESS;
if (!isCounterBased() || isEventTimestampFlagSet()) {
status = hostEventSetValue(Event::STATE_SIGNALED);
}
if (status == ZE_RESULT_SUCCESS) {
this->setIsCompleted();
}