Add threadsPerEUConfigs field

Change-Id: I90152b78512519bbe709be6beebdb28126de131e
This commit is contained in:
Lukasz Towarek
2020-06-19 15:50:16 +02:00
committed by sys_ocldev
parent 5eafc349c9
commit d1faf086af
5 changed files with 18 additions and 0 deletions

View File

@ -161,6 +161,14 @@ TEST_F(HwHelperTest, givenEngineTypeRcsWhenCsTraitsAreQueiredThenCorrectNameInTr
EXPECT_STREQ("RCS", csTraits.name);
}
using isTglLpOrBelow = IsAtMostProduct<IGFX_TIGERLAKE_LP>;
HWTEST2_F(HwHelperTest, givenHwHelperWhenGettingThreadsPerEUConfigsThenNoConfigsAreReturned, isTglLpOrBelow) {
auto &helper = HwHelper::get(renderCoreFamily);
auto &configs = helper.getThreadsPerEUConfigs();
EXPECT_EQ(0U, configs.size());
}
HWTEST_F(HwHelperTest, givenHwHelperWhenAskedForPageTableManagerSupportThenReturnCorrectValue) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(helper.isPageTableManagerSupported(hardwareInfo), UnitTestHelper<FamilyType>::isPageTableManagerSupported(hardwareInfo));

View File

@ -77,6 +77,7 @@ void Device::initializeCaps() {
? (systemInfo.EUCount / systemInfo.SubSliceCount)
: systemInfo.EuCountPerPoolMin;
deviceInfo.numThreadsPerEU = systemInfo.ThreadCount / systemInfo.EUCount;
deviceInfo.threadsPerEUConfigs = hwHelper.getThreadsPerEUConfigs();
auto maxWS = hwHelper.getMaxThreadsForWorkgroup(hwInfo, static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice)) * simdSizeUsed;
maxWS = Math::prevPowerOfTwo(maxWS);

View File

@ -41,6 +41,7 @@ struct DeviceInfo {
uint32_t maxSamplers;
uint32_t maxWriteImageArgs;
uint32_t numThreadsPerEU;
StackVec<uint32_t, 6> threadsPerEUConfigs;
uint32_t vendorId;
uint32_t vmeAvcSupportsPreemption;
bool debuggerActive;

View File

@ -74,6 +74,7 @@ class HwHelper {
bool useL1Cache) = 0;
virtual const EngineInstancesContainer getGpgpuEngineInstances(const HardwareInfo &hwInfo) const = 0;
virtual const StackVec<size_t, 3> getDeviceSubGroupSizes() const = 0;
virtual const StackVec<uint32_t, 6> getThreadsPerEUConfigs() const = 0;
virtual bool getEnableLocalMemory(const HardwareInfo &hwInfo) const = 0;
virtual std::string getExtensions() const = 0;
static uint32_t getMaxThreadsForVfe(const HardwareInfo &hwInfo);
@ -218,6 +219,8 @@ class HwHelperHw : public HwHelper {
const StackVec<size_t, 3> getDeviceSubGroupSizes() const override;
const StackVec<uint32_t, 6> getThreadsPerEUConfigs() const override;
bool getEnableLocalMemory(const HardwareInfo &hwInfo) const override;
std::string getExtensions() const override;

View File

@ -403,6 +403,11 @@ const StackVec<size_t, 3> HwHelperHw<GfxFamily>::getDeviceSubGroupSizes() const
return {8, 16, 32};
}
template <typename GfxFamily>
const StackVec<uint32_t, 6> HwHelperHw<GfxFamily>::getThreadsPerEUConfigs() const {
return {};
}
template <typename GfxFamily>
void HwHelperHw<GfxFamily>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties) const {}