fix: use non zero value for event completion.

upon device reset memory gets reset to 0, which can cause
false event completion.

Related-To: NEO-7765
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
Michal Mrozek
2024-02-22 14:16:24 +00:00
committed by Compute-Runtime-Automation
parent 226534d06a
commit 9f1648b57a
4 changed files with 10 additions and 6 deletions

View File

@@ -91,7 +91,7 @@ struct Event : _ze_event_handle_t {
virtual ze_result_t getWaitScope(ze_event_scope_flags_t *pWaitScope) = 0;
enum State : uint32_t {
STATE_SIGNALED = 0u,
STATE_SIGNALED = 2u,
HOST_CACHING_DISABLED_PERMANENT = std::numeric_limits<uint32_t>::max() - 2,
HOST_CACHING_DISABLED = std::numeric_limits<uint32_t>::max() - 1,
STATE_CLEARED = std::numeric_limits<uint32_t>::max(),

View File

@@ -372,8 +372,12 @@ ze_result_t EventImp<TagSizeT>::hostEventSetValueTimestamps(TagSizeT eventVal) {
uint64_t timestampStart = static_cast<uint64_t>(eventVal);
uint64_t timestampEnd = static_cast<uint64_t>(eventVal);
if (eventVal == Event::STATE_SIGNALED) {
timestampStart = static_cast<uint64_t>(this->gpuStartTimestamp);
timestampEnd = static_cast<uint64_t>(this->gpuEndTimestamp);
if (this->gpuStartTimestamp != 0u) {
timestampStart = static_cast<uint64_t>(this->gpuStartTimestamp);
}
if (this->gpuEndTimestamp != 0u) {
timestampEnd = static_cast<uint64_t>(this->gpuEndTimestamp);
}
}
uint32_t packets = 0;

View File

@@ -674,7 +674,7 @@ struct CommandListSignalAllEventPacketFixture : public ModuleFixture {
auto cmd = genCmdCast<MI_STORE_DATA_IMM *>(*itorStoreDataImm[i]);
EXPECT_EQ(gpuAddress, cmd->getAddress());
EXPECT_FALSE(cmd->getStoreQword());
EXPECT_EQ(0u, cmd->getDataDword0());
EXPECT_EQ(2u, cmd->getDataDword0());
if constexpr (multiTile == 1) {
EXPECT_TRUE(cmd->getWorkloadPartitionIdOffsetEnable());
} else {

View File

@@ -2956,7 +2956,7 @@ TEST_F(EventTests, givenRegularEventUseMultiplePacketsWhenHostSignalThenExpectAl
eventDesc.signal = 0;
eventDesc.wait = 0;
constexpr uint32_t packetsUsed = 4u;
uint32_t packetsUsed = std::min(4u, eventPool->getEventMaxPackets());
eventPool->setEventSize(static_cast<uint32_t>(alignUp(packetsUsed * device->getGfxCoreHelper().getSingleTimestampPacketSize(), 64)));
@@ -2983,7 +2983,7 @@ TEST_F(EventUsedPacketSignalTests, givenEventUseMultiplePacketsWhenHostSignalThe
eventDesc.signal = 0;
eventDesc.wait = 0;
constexpr uint32_t packetsUsed = 4u;
uint32_t packetsUsed = std::min(4u, eventPool->getEventMaxPackets());
eventPool->setEventSize(static_cast<uint32_t>(alignUp(packetsUsed * device->getGfxCoreHelper().getSingleTimestampPacketSize(), 64)));