Revert "fix: if device hierarchy is flat then getSubDevicesCount return 1u"

This reverts commit cb0bb57f49.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2023-10-26 15:04:39 +02:00
committed by Compute-Runtime-Automation
parent 40392b33f4
commit fca2159430
43 changed files with 79 additions and 87 deletions

View File

@@ -89,7 +89,7 @@ void ExecutionEnvironment::calculateMaxOsContextCount() {
auto hwInfo = rootDeviceEnvironment->getHardwareInfo();
auto &gfxCoreHelper = rootDeviceEnvironment->getHelper<GfxCoreHelper>();
auto osContextCount = static_cast<uint32_t>(gfxCoreHelper.getGpgpuEngineInstances(*rootDeviceEnvironment).size());
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo);
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
auto ccsCount = hwInfo->gtSystemInfo.CCSInfo.NumberOfCCSEnabled;
bool hasRootCsr = subDevicesCount > 1;
@@ -186,7 +186,7 @@ void ExecutionEnvironment::parseAffinityMask() {
if (exposeSubDevicesAsApiDevices) {
for (uint32_t currentRootDevice = 0u; currentRootDevice < static_cast<uint32_t>(rootDeviceEnvironments.size()); currentRootDevice++) {
auto hwInfo = rootDeviceEnvironments[currentRootDevice]->getHardwareInfo();
hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo);
hwSubDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
uint32_t currentSubDevice = 0;
mapOfIndices.push_back(std::make_tuple(currentRootDevice, currentSubDevice));
for (currentSubDevice = 1; currentSubDevice < hwSubDevicesCount; currentSubDevice++) {
@@ -231,7 +231,7 @@ void ExecutionEnvironment::parseAffinityMask() {
// cards as devices
if (rootDeviceIndex < numRootDevices) {
auto hwInfo = rootDeviceEnvironments[rootDeviceIndex]->getHardwareInfo();
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(this->isExposingSubDevicesAsDevices(), hwInfo);
auto subDevicesCount = GfxCoreHelper::getSubDevicesCount(hwInfo);
if (subEntries.size() > 1) {
uint32_t subDeviceIndex = StringHelpers::toUint32t(subEntries[1]);

View File

@@ -45,6 +45,9 @@ struct AllocationProperties;
struct HardwareInfo;
struct RootDeviceEnvironment : NonCopyableClass {
protected:
std::unique_ptr<HardwareInfo> hwInfo;
public:
RootDeviceEnvironment(ExecutionEnvironment &executionEnvironment);
MOCKABLE_VIRTUAL ~RootDeviceEnvironment();
@@ -120,7 +123,6 @@ struct RootDeviceEnvironment : NonCopyableClass {
bool isWddmOnLinuxEnable = false;
std::once_flag isDummyAllocationInitialized;
std::unique_ptr<AllocationProperties> dummyBlitProperties;
std::unique_ptr<HardwareInfo> hwInfo;
private:
std::mutex mtx;