refactor: return thread per eu from compiler product helper

Related-To: NEO-7442
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2023-03-08 09:30:38 +00:00
committed by Compute-Runtime-Automation
parent 0c5264dfeb
commit 553dd7f21f
112 changed files with 555 additions and 479 deletions

View File

@@ -7,6 +7,7 @@
#include "shared/source/aub_mem_dump/page_table_entry_bits.h"
#include "shared/source/command_stream/aub_command_stream_receiver_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/engine_node_helper.h"
#include "shared/source/memory_manager/memory_banks.h"
#include "shared/source/memory_manager/memory_pool.h"
@@ -34,7 +35,8 @@ struct XeHPAndLaterAubCommandStreamReceiverTests : DeviceFixture, ::testing::Tes
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}

View File

@@ -7,6 +7,7 @@
#include "shared/source/aub/aub_helper.h"
#include "shared/source/command_stream/command_stream_receiver_simulated_common_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/helpers/hardware_context_controller.h"
#include "shared/test/common/fixtures/device_fixture.h"
#include "shared/test/common/helpers/debug_manager_state_restore.h"
@@ -194,7 +195,8 @@ class XeHPAndLaterTileRangeRegisterTest : public DeviceFixture, public ::testing
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}

View File

@@ -175,6 +175,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
case CSR_HW_WITH_AUB:
@@ -202,7 +203,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsForDepreca
hwInfoFromTable.featureTable = {};
hwInfoFromTable.workaroundTable = {};
hwInfoFromTable.gtSystemInfo = {};
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0);
hardwareInfoSetup[hwInfoFromTable.platform.eProductFamily](&hwInfoFromTable, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&hwInfoFromTable, nullptr);
EXPECT_EQ(0, memcmp(&hwInfoFromTable.platform, &hwInfo->platform, sizeof(PLATFORM)));
@@ -250,6 +251,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
@@ -267,10 +269,9 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsWhenCsrIsS
expectedHwInfo.featureTable = {};
expectedHwInfo.workaroundTable = {};
expectedHwInfo.gtSystemInfo = {};
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0);
hardwareInfoSetup[expectedHwInfo.platform.eProductFamily](&expectedHwInfo, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&expectedHwInfo, nullptr);
const auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
compilerProductHelper.setProductConfigForHwInfo(expectedHwInfo, deviceAot.aotConfig);
expectedHwInfo.platform.usDeviceID = deviceAot.deviceIds->front();
@@ -338,6 +339,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
for (auto i = 0u; i < expectedDevices; i++) {
hwInfo = exeEnv.rootDeviceEnvironments[i]->getHardwareInfo();
auto &productHelper = exeEnv.rootDeviceEnvironments[i]->getProductHelper();
auto &compilerProductHelper = exeEnv.rootDeviceEnvironments[i]->getHelper<CompilerProductHelper>();
switch (csrType) {
case CSR_HW:
@@ -362,7 +364,7 @@ HWTEST_F(PrepareDeviceEnvironmentsTest, givenPrepareDeviceEnvironmentsAndUnknown
baseHwInfo.featureTable = {};
baseHwInfo.workaroundTable = {};
baseHwInfo.gtSystemInfo = {};
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0);
hardwareInfoSetup[baseHwInfo.platform.eProductFamily](&baseHwInfo, true, 0x0, compilerProductHelper);
productHelper.configureHardwareCustom(&baseHwInfo, nullptr);
EXPECT_EQ(0, memcmp(&baseHwInfo.platform, &hwInfo->platform, sizeof(PLATFORM)));

View File

@@ -6,6 +6,7 @@
*/
#include "shared/source/command_stream/tbx_command_stream_receiver_hw.h"
#include "shared/source/helpers/compiler_product_helper.h"
#include "shared/source/memory_manager/memory_banks.h"
#include "shared/source/memory_manager/memory_pool.h"
#include "shared/source/memory_manager/physical_address_allocator.h"
@@ -22,7 +23,8 @@ struct XeHPAndLaterTbxCommandStreamReceiverTests : DeviceFixture, ::testing::Tes
template <typename FamilyType>
void setUpImpl() {
hardwareInfo = *defaultHwInfo;
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0);
auto compilerProductHelper = CompilerProductHelper::create(hardwareInfo.platform.eProductFamily);
hardwareInfoSetup[hardwareInfo.platform.eProductFamily](&hardwareInfo, true, 0, *compilerProductHelper);
hardwareInfo.gtSystemInfo.MultiTileArchInfo.IsValid = true;
DeviceFixture::setUpImpl(&hardwareInfo);
}