fix: setup threads per EU configs based on real threads per eu count

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski 2024-11-12 11:34:19 +00:00 committed by Compute-Runtime-Automation
parent 7dfa654761
commit 33d2a40cc8
5 changed files with 6 additions and 6 deletions

View File

@ -135,7 +135,7 @@ void Device::initializeCaps() {
deviceInfo.numThreadsPerEU = systemInfo.ThreadCount / systemInfo.EUCount;
if (releaseHelper) {
deviceInfo.threadsPerEUConfigs = releaseHelper->getThreadsPerEUConfigs();
deviceInfo.threadsPerEUConfigs = releaseHelper->getThreadsPerEUConfigs(deviceInfo.numThreadsPerEU);
}
auto maxWS = productHelper.getMaxThreadsForWorkgroupInDSSOrSS(hwInfo, static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice), static_cast<uint32_t>(deviceInfo.maxNumEUsPerDualSubSlice)) * simdSizeUsed;

View File

@ -52,7 +52,7 @@ class ReleaseHelper {
virtual bool isGlobalBindlessAllocatorEnabled() const = 0;
virtual uint32_t getNumThreadsPerEu() const = 0;
virtual uint64_t getTotalMemBankSize() const = 0;
virtual const ThreadsPerEUConfigs getThreadsPerEUConfigs() const = 0;
virtual const ThreadsPerEUConfigs getThreadsPerEUConfigs(uint32_t numThreadsPerEu) const = 0;
virtual const std::string getDeviceConfigString(uint32_t tileCount, uint32_t sliceCount, uint32_t subSliceCount, uint32_t euPerSubSliceCount) const = 0;
virtual bool isRayTracingSupported() const = 0;
virtual uint32_t getL3BankCount() const = 0;
@ -94,7 +94,7 @@ class ReleaseHelperHw : public ReleaseHelper {
bool isGlobalBindlessAllocatorEnabled() const override;
uint32_t getNumThreadsPerEu() const override;
uint64_t getTotalMemBankSize() const override;
const StackVec<uint32_t, 6> getThreadsPerEUConfigs() const override;
const StackVec<uint32_t, 6> getThreadsPerEUConfigs(uint32_t numThreadsPerEu) const override;
const std::string getDeviceConfigString(uint32_t tileCount, uint32_t sliceCount, uint32_t subSliceCount, uint32_t euPerSubSliceCount) const override;
bool isRayTracingSupported() const override;
uint32_t getL3BankCount() const override;

View File

@ -100,7 +100,7 @@ uint64_t ReleaseHelperHw<releaseType>::getTotalMemBankSize() const {
}
template <ReleaseType releaseType>
const ThreadsPerEUConfigs ReleaseHelperHw<releaseType>::getThreadsPerEUConfigs() const {
const ThreadsPerEUConfigs ReleaseHelperHw<releaseType>::getThreadsPerEUConfigs(uint32_t numThreadsPerEu) const {
return {4, 8};
}

View File

@ -32,7 +32,7 @@ class MockReleaseHelper : public ReleaseHelper {
ADDMETHOD_CONST_NOBASE(isGlobalBindlessAllocatorEnabled, bool, false, ());
ADDMETHOD_CONST_NOBASE(getNumThreadsPerEu, uint32_t, 8u, ());
ADDMETHOD_CONST_NOBASE(getTotalMemBankSize, uint64_t, 32ull * MemoryConstants::gigaByte, ());
ADDMETHOD_CONST_NOBASE(getThreadsPerEUConfigs, const ThreadsPerEUConfigs, {}, ());
ADDMETHOD_CONST_NOBASE(getThreadsPerEUConfigs, const ThreadsPerEUConfigs, {}, (uint32_t numThreadsPerEu));
ADDMETHOD_CONST_NOBASE(getDeviceConfigString, const std::string, {}, (uint32_t tileCount, uint32_t sliceCount, uint32_t subSliceCount, uint32_t euPerSubSliceCount));
ADDMETHOD_CONST_NOBASE(isRayTracingSupported, bool, true, ());
ADDMETHOD_CONST_NOBASE(getL3BankCount, uint32_t, 0u, ());

View File

@ -52,7 +52,7 @@ void ReleaseHelperTestsBase::whenGettingThreadsPerEuConfigsThen4And8AreReturned(
ipVersion.revision = revision;
releaseHelper = ReleaseHelper::create(ipVersion);
ASSERT_NE(nullptr, releaseHelper);
auto &configs = releaseHelper->getThreadsPerEUConfigs();
auto &configs = releaseHelper->getThreadsPerEUConfigs(8u);
EXPECT_EQ(2U, configs.size());
EXPECT_EQ(4U, configs[0]);