diff --git a/level_zero/core/source/event/event.cpp b/level_zero/core/source/event/event.cpp index 3b9a2e8ca5..b9ccc66ceb 100644 --- a/level_zero/core/source/event/event.cpp +++ b/level_zero/core/source/event/event.cpp @@ -42,7 +42,7 @@ template Event *Event::create(const EventDescriptor &, const ze_event_ template Event *Event::create(const EventDescriptor &, const ze_event_desc_t *, Device *); bool Event::standaloneInOrderTimestampAllocationEnabled() { - return (NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.get() == 1); + return (NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.get() != 0); } ze_result_t EventPool::initialize(DriverHandle *driver, Context *context, uint32_t numDevices, ze_device_handle_t *deviceHandles) { diff --git a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist.cpp b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist.cpp index 8ef6300211..68acd54d70 100644 --- a/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist.cpp +++ b/level_zero/core/test/unit_tests/sources/cmdlist/test_in_order_cmdlist.cpp @@ -6622,11 +6622,23 @@ HWTEST2_F(InOrderRegularCmdListTests, givenAddedCmdForPatchWhenUpdateNewInOrderI struct StandaloneInOrderTimestampAllocationTests : public InOrderCmdListTests { void SetUp() override { - NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.set(1); InOrderCmdListTests::SetUp(); } }; +HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenDebugFlagSetWhenCreatingEventThenDontCreateTimestampNode, MatchAny) { + NEO::debugManager.flags.StandaloneInOrderTimestampAllocationEnabled.set(0); + + auto eventPool = createEvents(1, true); + + auto cmdList = createImmCmdList(); + + cmdList->appendLaunchKernel(kernel->toHandle(), groupCount, events[0]->toHandle(), 0, nullptr, launchParams, false); + + EXPECT_EQ(nullptr, events[0]->inOrderTimestampNode); + EXPECT_NE(nullptr, events[0]->eventPoolAllocation); +} + HWTEST2_F(StandaloneInOrderTimestampAllocationTests, givenTimestampEventWhenAskingForAllocationOrGpuAddressThenReturnNodeAllocation, MatchAny) { auto eventPool = createEvents(2, true);