fix: Do not wait only on timestamp when heapless enabled

During host synchronize on profiling counter based event then timestamp
wait only when using entire optimized counter based event infrastructure
enabled, so when heapless disabled.

Resolves: HSD-18041396186

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-02-03 12:41:18 +00:00
committed by Compute-Runtime-Automation
parent 0855e8a46d
commit 3bc841a8a8
2 changed files with 6 additions and 3 deletions

View File

@@ -11,6 +11,7 @@
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/device/sub_device.h"
#include "shared/source/helpers/basic_math.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hw_info.h"
#include "shared/source/memory_manager/internal_allocation_storage.h"
#include "shared/source/memory_manager/memory_operations_handler.h"
@@ -665,7 +666,7 @@ ze_result_t EventImp<TagSizeT>::hostSynchronize(uint64_t timeout) {
}
TaskCountType taskCountToWaitForL3Flush = 0;
if (((this->isCounterBased() && this->inOrderTimestampNode) || this->mitigateHostVisibleSignal) && this->device->getProductHelper().isDcFlushAllowed()) {
if (((this->isCounterBased() && this->inOrderTimestampNode) || this->mitigateHostVisibleSignal) && this->device->getProductHelper().isDcFlushAllowed() && !this->device->getCompilerProductHelper().isHeaplessModeEnabled()) {
auto lock = this->csrs[0]->obtainUniqueOwnership();
this->csrs[0]->flushTagUpdate();
taskCountToWaitForL3Flush = this->csrs[0]->peekLatestFlushedTaskCount();
@@ -677,7 +678,7 @@ ze_result_t EventImp<TagSizeT>::hostSynchronize(uint64_t timeout) {
const bool fenceWait = isKmdWaitModeEnabled() && isCounterBased() && csrs[0]->waitUserFenceSupported();
do {
if (this->isCounterBased() && this->inOrderTimestampNode) {
if (this->isCounterBased() && this->inOrderTimestampNode && !this->device->getCompilerProductHelper().isHeaplessModeEnabled()) {
synchronizeTimestampCompletionWithTimeout();
if (this->isTimestampPopulated()) {
inOrderExecInfo->setLastWaitedCounterValue(getInOrderExecSignalValueWithSubmissionCounter());

View File

@@ -5345,9 +5345,11 @@ HWTEST2_F(InOrderCmdListTests, givenCounterBasedTimestampHostVisibleSignalWhenCa
auto eventObj = Event::fromHandle(handle);
*static_cast<Event::State *>(ptrOffset(eventObj->getHostAddress(), eventObj->getContextEndOffset())) = Event::State::STATE_SIGNALED;
auto hostAddress = static_cast<uint64_t *>(immCmdList->inOrderExecInfo->getBaseHostAddress());
*hostAddress = 1u;
EXPECT_EQ(ZE_RESULT_SUCCESS, eventObj->hostSynchronize(-1));
if (device->getProductHelper().isDcFlushAllowed()) {
if (device->getProductHelper().isDcFlushAllowed() && !immCmdList->isHeaplessModeEnabled()) {
EXPECT_TRUE(ultCsr->waitForTaskCountCalled);
EXPECT_TRUE(ultCsr->flushTagUpdateCalled);
} else {