@@ -1592,6 +1592,7 @@ HWTEST_TEMPLATED_F(AubCsrTest, givenAubCsrWhenCallingExecuteCommandListsThenPoll
1592
1592
L0::CommandQueue::fromHandle (commandQueue)->destroy ();
1593
1593
}
1594
1594
using CommandQueueSynchronizeTest = Test<ContextFixture>;
1595
+ using MultiTileCommandQueueSynchronizeTest = Test<SingleRootMultiSubDeviceFixture>;
1595
1596
1596
1597
template <typename GfxFamily>
1597
1598
struct SynchronizeCsr : public NEO ::UltCommandStreamReceiver<GfxFamily> {
@@ -1698,7 +1699,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenDebugOverrideEnabledWhenCallToSynchro
1698
1699
L0::CommandQueue::fromHandle (commandQueue)->destroy ();
1699
1700
}
1700
1701
1701
- HWTEST_F (CommandQueueSynchronizeTest , givenMultiplePartitionCountWhenCallingSynchronizeThenExpectTheSameNumberCsrSynchronizeCalls) {
1702
+ HWTEST2_F (MultiTileCommandQueueSynchronizeTest , givenMultiplePartitionCountWhenCallingSynchronizeThenExpectTheSameNumberCsrSynchronizeCalls, IsWithinXeGfxFamily ) {
1702
1703
const ze_command_queue_desc_t desc{};
1703
1704
ze_result_t returnValue;
1704
1705
@@ -1717,13 +1718,15 @@ HWTEST_F(CommandQueueSynchronizeTest, givenMultiplePartitionCountWhenCallingSync
1717
1718
returnValue));
1718
1719
EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
1719
1720
ASSERT_NE (nullptr , commandQueue);
1721
+ EXPECT_EQ (2u , commandQueue->activeSubDevices );
1720
1722
1721
1723
auto commandList = std::unique_ptr<CommandList>(whitebox_cast (CommandList::create (productFamily, device, NEO::EngineGroupType::RenderCompute, 0u , returnValue)));
1722
1724
ASSERT_NE (nullptr , commandList);
1723
1725
commandList->partitionCount = 2 ;
1724
1726
1725
1727
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);
1727
1730
1728
1731
uint64_t timeout = std::numeric_limits<uint64_t >::max ();
1729
1732
commandQueue->synchronize (timeout);
@@ -1733,7 +1736,7 @@ HWTEST_F(CommandQueueSynchronizeTest, givenMultiplePartitionCountWhenCallingSync
1733
1736
L0::CommandQueue::fromHandle (commandQueue)->destroy ();
1734
1737
}
1735
1738
1736
- HWTEST_F (CommandQueueSynchronizeTest , givenCsrHasMultipleActivePartitionWhenExecutingCmdListOnNewCmdQueueThenExpectCmdPartitionCountMatchCsrActivePartitions) {
1739
+ HWTEST2_F (MultiTileCommandQueueSynchronizeTest , givenCsrHasMultipleActivePartitionWhenExecutingCmdListOnNewCmdQueueThenExpectCmdPartitionCountMatchCsrActivePartitions, IsWithinXeGfxFamily ) {
1737
1740
const ze_command_queue_desc_t desc{};
1738
1741
ze_result_t returnValue;
1739
1742
@@ -1753,18 +1756,46 @@ HWTEST_F(CommandQueueSynchronizeTest, givenCsrHasMultipleActivePartitionWhenExec
1753
1756
returnValue));
1754
1757
EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
1755
1758
ASSERT_NE (nullptr , commandQueue);
1759
+ EXPECT_EQ (2u , commandQueue->activeSubDevices );
1756
1760
1757
1761
auto commandList = std::unique_ptr<CommandList>(whitebox_cast (CommandList::create (productFamily, device, NEO::EngineGroupType::RenderCompute, 0u , returnValue)));
1758
1762
ASSERT_NE (nullptr , commandList);
1759
1763
1760
1764
ze_command_list_handle_t cmdListHandle = commandList->toHandle ();
1761
1765
commandQueue->executeCommandLists (1 , &cmdListHandle, nullptr , false );
1766
+ EXPECT_EQ (returnValue, ZE_RESULT_SUCCESS);
1762
1767
1763
1768
EXPECT_EQ (2u , commandQueue->partitionCount );
1764
1769
1765
1770
L0::CommandQueue::fromHandle (commandQueue)->destroy ();
1766
1771
}
1767
1772
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
+
1768
1799
template <typename GfxFamily>
1769
1800
struct TestCmdQueueCsr : public NEO ::UltCommandStreamReceiver<GfxFamily> {
1770
1801
TestCmdQueueCsr (const NEO::ExecutionEnvironment &executionEnvironment, const DeviceBitfield deviceBitfield)
0 commit comments