@@ -1592,6 +1592,7 @@ HWTEST_TEMPLATED_F(AubCsrTest, givenAubCsrWhenCallingExecuteCommandListsThenPoll
15921592 L0::CommandQueue::fromHandle (commandQueue)->destroy ();
15931593}
15941594using CommandQueueSynchronizeTest = Test<ContextFixture>;
1595+ using MultiTileCommandQueueSynchronizeTest = Test<SingleRootMultiSubDeviceFixture>;
15951596
15961597template <typename GfxFamily>
15971598struct SynchronizeCsr : public NEO ::UltCommandStreamReceiver<GfxFamily> {
@@ -1698,7 +1699,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenDebugOverrideEnabledWhenCallToSynchro
16981699 L0::CommandQueue::fromHandle (commandQueue)->destroy ();
16991700}
17001701
1701- HWTEST_F (CommandQueueSynchronizeTest , givenMultiplePartitionCountWhenCallingSynchronizeThenExpectTheSameNumberCsrSynchronizeCalls) {
1702+ HWTEST2_F (MultiTileCommandQueueSynchronizeTest , givenMultiplePartitionCountWhenCallingSynchronizeThenExpectTheSameNumberCsrSynchronizeCalls, IsWithinXeGfxFamily ) {
17021703 const ze_command_queue_desc_t desc{};
17031704 ze_result_t returnValue;
17041705
@@ -1717,13 +1718,15 @@ HWTEST_F(CommandQueueSynchronizeTest, givenMultiplePartitionCountWhenCallingSync
17171718 returnValue));
17181719 EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
17191720 ASSERT_NE (nullptr , commandQueue);
1721+ EXPECT_EQ (2u , commandQueue->activeSubDevices );
17201722
17211723 auto commandList = std::unique_ptr<CommandList>(whitebox_cast (CommandList::create (productFamily, device, NEO::EngineGroupType::RenderCompute, 0u , returnValue)));
17221724 ASSERT_NE (nullptr , commandList);
17231725 commandList->partitionCount = 2 ;
17241726
17251727 ze_command_list_handle_t cmdListHandle = commandList->toHandle ();
1726- commandQueue->executeCommandLists (1 , &cmdListHandle, nullptr , false );
1728+ returnValue = commandQueue->executeCommandLists (1 , &cmdListHandle, nullptr , false );
1729+ EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
17271730
17281731 uint64_t timeout = std::numeric_limits<uint64_t >::max ();
17291732 commandQueue->synchronize (timeout);
@@ -1733,7 +1736,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenMultiplePartitionCountWhenCallingSync
17331736 L0::CommandQueue::fromHandle (commandQueue)->destroy ();
17341737}
17351738
1736- HWTEST_F (CommandQueueSynchronizeTest , givenCsrHasMultipleActivePartitionWhenExecutingCmdListOnNewCmdQueueThenExpectCmdPartitionCountMatchCsrActivePartitions) {
1739+ HWTEST2_F (MultiTileCommandQueueSynchronizeTest , givenCsrHasMultipleActivePartitionWhenExecutingCmdListOnNewCmdQueueThenExpectCmdPartitionCountMatchCsrActivePartitions, IsWithinXeGfxFamily ) {
17371740 const ze_command_queue_desc_t desc{};
17381741 ze_result_t returnValue;
17391742
@@ -1753,18 +1756,46 @@ HWTEST_F(CommandQueueSynchronizeTest, givenCsrHasMultipleActivePartitionWhenExec
17531756 returnValue));
17541757 EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
17551758 ASSERT_NE (nullptr , commandQueue);
1759+ EXPECT_EQ (2u , commandQueue->activeSubDevices );
17561760
17571761 auto commandList = std::unique_ptr<CommandList>(whitebox_cast (CommandList::create (productFamily, device, NEO::EngineGroupType::RenderCompute, 0u , returnValue)));
17581762 ASSERT_NE (nullptr , commandList);
17591763
17601764 ze_command_list_handle_t cmdListHandle = commandList->toHandle ();
17611765 commandQueue->executeCommandLists (1 , &cmdListHandle, nullptr , false );
1766+ EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
17621767
17631768 EXPECT_EQ (2u , commandQueue->partitionCount );
17641769
17651770 L0::CommandQueue::fromHandle (commandQueue)->destroy ();
17661771}
17671772
1773+ HWTEST_F (CommandQueueSynchronizeTest, givenSingleTileCsrWhenExecutingMultiTileCommandListThenExpectErrorOnExecute) {
1774+ const ze_command_queue_desc_t desc{};
1775+ ze_result_t returnValue;
1776+
1777+ auto commandQueue = whitebox_cast (CommandQueue::create (productFamily,
1778+ device,
1779+ neoDevice->getDefaultEngine ().commandStreamReceiver ,
1780+ &desc,
1781+ false ,
1782+ false ,
1783+ returnValue));
1784+ EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
1785+ ASSERT_NE (nullptr , commandQueue);
1786+ EXPECT_EQ (1u , commandQueue->activeSubDevices );
1787+
1788+ auto commandList = std::unique_ptr<CommandList>(whitebox_cast (CommandList::create (productFamily, device, NEO::EngineGroupType::RenderCompute, 0u , returnValue)));
1789+ ASSERT_NE (nullptr , commandList);
1790+ commandList->partitionCount = 2 ;
1791+
1792+ ze_command_list_handle_t cmdListHandle = commandList->toHandle ();
1793+ returnValue = commandQueue->executeCommandLists (1 , &cmdListHandle, nullptr , false );
1794+ EXPECT_EQ (returnValue, ZE_RESULT_ERROR_INVALID_COMMAND_LIST_TYPE);
1795+
1796+ L0::CommandQueue::fromHandle (commandQueue)->destroy ();
1797+ }
1798+
17681799template <typename GfxFamily>
17691800struct TestCmdQueueCsr : public NEO ::UltCommandStreamReceiver<GfxFamily> {
17701801 TestCmdQueueCsr (const NEO::ExecutionEnvironment &executionEnvironment, const DeviceBitfield deviceBitfield)
0 commit comments