Skip to content

Commit 6f08328

Browse files
Fix sporadic issue in test.
- Parse commands after flush - Sequence was as follows: ndr1 1.Parse commands ndr2 2.Parse commands cmdq->flush cmdq2->flush During parsing #1 we parse BATCH_BUFFER_END at the end of command buffer. Following NOOP is also parsed. Then at flush time, BATCH_BUFFER_END is replace with BATCH_BUFFER_START as we chain them together, however parser is not updated at this point and still thinks that there is BATCH_BUFFER_END there. Then we try to locate MEDIA_VFE_STATE, under NOOP iterator we currently have BATCH_BUFFER_START GPU VA start address that is random. Depending on the luck, address may be interpreted as VFE_STATE and test sporadically fails :) Change-Id: I1d6f2547f1b85f17349976245db7bdcb9fe6b17c Signed-off-by: Michal Mrozek <[email protected]>
1 parent d3e583f commit 6f08328

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

unit_tests/command_queue/enqueue_kernel_two_ooq_tests.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ struct TwoOOQsTwoDependentWalkers : public HelloWorldTest<OOQFixtureFactory>,
5959
&event1);
6060

6161
ASSERT_EQ(CL_SUCCESS, retVal);
62-
HardwareParse::parseCommands<FamilyType>(*pCmdQ);
6362

6463
// Create a second command queue (beyond the default one)
6564
pCmdQ2 = createCommandQueue(pDevice, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);
@@ -76,11 +75,13 @@ struct TwoOOQsTwoDependentWalkers : public HelloWorldTest<OOQFixtureFactory>,
7675
&event2);
7776

7877
ASSERT_EQ(CL_SUCCESS, retVal);
79-
HardwareParse::parseCommands<FamilyType>(*pCmdQ2);
8078

8179
pCmdQ->flush();
8280
pCmdQ2->flush();
8381

82+
HardwareParse::parseCommands<FamilyType>(*pCmdQ);
83+
HardwareParse::parseCommands<FamilyType>(*pCmdQ2);
84+
8485
Event *E1 = castToObject<Event>(event1);
8586
ASSERT_NE(nullptr, E1);
8687
Event *E2 = castToObject<Event>(event2);

0 commit comments

Comments
 (0)