Skip to content

Commit e09724c

Browse files
Baj, TomaszCompute-Runtime-Automation
authored andcommitted
Revert "fix: if device hierarchy is flat then getSubDevicesCount return 1u"
This reverts commit 44577dd. Signed-off-by: Baj, Tomasz <tomasz.baj@intel.com> Source: fca2159
1 parent e0b6a1d commit e09724c

File tree

43 files changed

+79
-87
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+79
-87
lines changed

level_zero/core/source/device/device_imp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ void DeviceImp::setDebugSession(DebugSession *session) {
15881588
}
15891589
bool DeviceImp::toPhysicalSliceId(const NEO::TopologyMap &topologyMap, uint32_t &slice, uint32_t &subslice, uint32_t &deviceIndex) {
15901590
auto hwInfo = neoDevice->getRootDeviceEnvironment().getHardwareInfo();
1591-
uint32_t subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(neoDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), hwInfo);
1591+
uint32_t subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(hwInfo);
15921592
auto deviceBitfield = neoDevice->getDeviceBitfield();
15931593

15941594
if (topologyMap.size() == subDeviceCount && !isSubdevice) {

level_zero/sysman/source/linux/zes_os_sysman_imp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ze_result_t LinuxSysmanImp::init() {
5858
}
5959
DEBUG_BREAK_IF(nullptr == pSysfsAccess);
6060

61-
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo());
61+
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
6262
if (subDeviceCount == 1) {
6363
subDeviceCount = 0;
6464
}

level_zero/sysman/source/ras/linux/sysman_os_ras_imp_hbm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ze_result_t LinuxRasSourceHbm::osRasGetState(zes_ras_state_t &state, ze_bool_t c
2929
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
3030
}
3131
uint32_t subDeviceCount = 0;
32-
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pDevice->getHardwareInfo());
32+
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pDevice->getHardwareInfo());
3333
if (clear == true) {
3434
uint64_t errorCount = 0;
3535
ze_result_t result = pFwInterface->fwGetMemoryErrorCount(osRasErrorType, subDeviceCount, subdeviceId, errorCount);

level_zero/sysman/source/windows/zes_os_sysman_imp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ze_result_t WddmSysmanImp::init() {
3030
pKmdSysManager = KmdSysManager::create(pWddm);
3131
UNRECOVERABLE_IF(nullptr == pKmdSysManager);
3232

33-
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(false, &pParentSysmanDeviceImp->getHardwareInfo());
33+
subDeviceCount = NEO::GfxCoreHelper::getSubDevicesCount(&pParentSysmanDeviceImp->getHardwareInfo());
3434
if (subDeviceCount == 1) {
3535
subDeviceCount = 0;
3636
}

level_zero/tools/source/sysman/sysman_imp.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "level_zero/tools/source/sysman/sysman_imp.h"
99

1010
#include "shared/source/device/sub_device.h"
11-
#include "shared/source/execution_environment/execution_environment.h"
1211
#include "shared/source/helpers/basic_math.h"
1312
#include "shared/source/helpers/gfx_core_helper.h"
1413
#include "shared/source/helpers/hw_info.h"
@@ -89,7 +88,7 @@ void SysmanDeviceImp::getSysmanDeviceInfo(zes_device_handle_t hDevice, uint32_t
8988
// Check for root device with 1 sub-device case
9089
if (!neoDevice->isSubDevice() && neoDevice->getDeviceBitfield().count() == 1) {
9190
subdeviceId = Math::log2(static_cast<uint32_t>(neoDevice->getDeviceBitfield().to_ulong()));
92-
if ((NEO::GfxCoreHelper::getSubDevicesCount(neoDevice->getExecutionEnvironment()->isExposingSubDevicesAsDevices(), &neoDevice->getHardwareInfo()) > 1) && useMultiArchEnabled) {
91+
if ((NEO::GfxCoreHelper::getSubDevicesCount(&neoDevice->getHardwareInfo()) > 1) && useMultiArchEnabled) {
9392
onSubdevice = true;
9493
}
9594
} else if (neoDevice->isSubDevice()) {

level_zero/tools/test/unit_tests/sources/sysman/mocks/mock_sysman_device_info.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class SysmanMultiDeviceInfoFixture : public ::testing::Test {
3131
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile0 = 1;
3232
hwInfo.gtSystemInfo.MultiTileArchInfo.Tile1 = 1;
3333
auto executionEnvironment = MockDevice::prepareExecutionEnvironment(&hwInfo, 0u);
34-
executionEnvironment->setExposeSubDevicesAsDevices(false);
3534
neoDevice = NEO::MockDevice::createWithExecutionEnvironment<NEO::MockDevice>(&hwInfo, executionEnvironment, 0u);
3635

3736
NEO::DeviceVector devices;

opencl/test/unit_test/aub_tests/fixtures/multicontext_aub_fixture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
8181
strfilename << renderEngineName << "_CCS0_3"; // xehp_config_name_RCS_CCS0_3.aub
8282
}
8383

84-
auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex, platform()->peekExecutionEnvironment()->isExposingSubDevicesAsDevices());
84+
auto filename = AUBCommandStreamReceiver::createFullFilePath(localHwInfo, strfilename.str(), rootDeviceIndex);
8585

8686
DebugManager.flags.AUBDumpCaptureFileName.set(filename);
8787

opencl/test/unit_test/device/device_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ TEST(ClDeviceHelperTest, givenNonZeroNumberOfTilesWhenPrepareDeviceEnvironmentsC
735735
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
736736
DebugManager.flags.CreateMultipleSubDevices.set(0);
737737

738-
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
738+
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
739739
EXPECT_EQ(devicesCount, 3u);
740740
}
741741

@@ -751,7 +751,7 @@ TEST(ClDeviceHelperTest, givenZeroNumberOfTilesWhenPrepareDeviceEnvironmentsCoun
751751
HardwareInfo hwInfo{&platform, &skuTable, &waTable, &sysInfo, capTable};
752752
DebugManager.flags.CreateMultipleSubDevices.set(0);
753753

754-
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(false, &hwInfo);
754+
uint32_t devicesCount = GfxCoreHelper::getSubDevicesCount(&hwInfo);
755755
EXPECT_EQ(devicesCount, 1u);
756756
}
757757

opencl/test/unit_test/linux/main_linux_dll.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ TEST_F(DrmTests, whenDrmIsCreatedWithMultipleSubDevicesThenCreateMultipleVirtual
712712
GTEST_SKIP();
713713
}
714714

715-
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
715+
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
716716
for (auto id = 0u; id < numSubDevices; id++) {
717717
EXPECT_EQ(id + 1, drm->getVirtualMemoryAddressSpace(id));
718718
}
@@ -730,7 +730,7 @@ TEST_F(DrmTests, givenDebuggingEnabledWhenDrmIsCreatedThenPerContextVMIsTrueGetV
730730
if (drm->isVmBindAvailable()) {
731731
EXPECT_TRUE(drm->isPerContextVMRequired());
732732

733-
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
733+
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
734734
for (auto id = 0u; id < numSubDevices; id++) {
735735
EXPECT_EQ(0u, drm->getVirtualMemoryAddressSpace(id));
736736
}
@@ -759,7 +759,7 @@ TEST_F(DrmTests, givenEnabledDebuggingAndVmBindNotAvailableWhenDrmIsCreatedThenP
759759
GTEST_SKIP();
760760
}
761761

762-
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(false, rootDeviceEnvironment->getHardwareInfo());
762+
auto numSubDevices = GfxCoreHelper::getSubDevicesCount(rootDeviceEnvironment->getHardwareInfo());
763763
for (auto id = 0u; id < numSubDevices; id++) {
764764
EXPECT_NE(0u, drm->getVirtualMemoryAddressSpace(id));
765765
}

shared/source/aub/aub_center.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
#include "shared/source/aub/aub_helper.h"
1111
#include "shared/source/debug_settings/debug_settings_manager.h"
12-
#include "shared/source/execution_environment/execution_environment.h"
1312
#include "shared/source/execution_environment/root_device_environment.h"
1413
#include "shared/source/helpers/gfx_core_helper.h"
1514
#include "shared/source/helpers/hw_info.h"
@@ -25,9 +24,8 @@ extern aub_stream::AubManager *createAubManager(const aub_stream::AubManagerOpti
2524
AubCenter::AubCenter(const RootDeviceEnvironment &rootDeviceEnvironment, bool localMemoryEnabled, const std::string &aubFileName, CommandStreamReceiverType csrType) {
2625
if (DebugManager.flags.UseAubStream.get()) {
2726
auto hwInfo = rootDeviceEnvironment.getHardwareInfo();
28-
bool subDevicesAsDevices = rootDeviceEnvironment.executionEnvironment.isExposingSubDevicesAsDevices();
29-
auto devicesCount = GfxCoreHelper::getSubDevicesCount(subDevicesAsDevices, hwInfo);
30-
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(subDevicesAsDevices, hwInfo);
27+
auto devicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
28+
auto memoryBankSize = AubHelper::getPerTileLocalMemorySize(hwInfo);
3129
CommandStreamReceiverType type = csrType;
3230
if (DebugManager.flags.SetCommandStreamReceiver.get() >= CommandStreamReceiverType::CSR_HW) {
3331
type = static_cast<CommandStreamReceiverType>(DebugManager.flags.SetCommandStreamReceiver.get());

0 commit comments

Comments
 (0)