Rename HwHelper -> GfxCoreHelper

Related-To: NEO-6853
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2022-12-08 12:22:35 +00:00
committed by Compute-Runtime-Automation
parent 15b6d94555
commit 03b687881f
344 changed files with 2184 additions and 2176 deletions

View File

@@ -77,7 +77,7 @@ SubDevice *Device::createEngineInstancedSubDevice(uint32_t subDeviceIndex, aub_s
bool Device::genericSubDevicesAllowed() {
auto deviceMask = executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->deviceAffinityMask.getGenericSubDevicesMask();
uint32_t subDeviceCount = HwHelper::getSubDevicesCount(&getHardwareInfo());
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(&getHardwareInfo());
deviceBitfield = maxNBitValue(subDeviceCount);
deviceBitfield &= deviceMask;
numSubDevices = static_cast<uint32_t>(deviceBitfield.count());
@@ -92,7 +92,7 @@ bool Device::engineInstancedSubDevicesAllowed() {
bool notAllowed = !DebugManager.flags.EngineInstancedSubDevices.get();
notAllowed |= engineInstanced;
notAllowed |= (getHardwareInfo().gtSystemInfo.CCSInfo.NumberOfCCSEnabled < 2);
notAllowed |= ((HwHelper::getSubDevicesCount(&getHardwareInfo()) < 2) && (!DebugManager.flags.AllowSingleTileEngineInstancedSubDevices.get()));
notAllowed |= ((GfxCoreHelper::getSubDevicesCount(&getHardwareInfo()) < 2) && (!DebugManager.flags.AllowSingleTileEngineInstancedSubDevices.get()));
if (notAllowed) {
return false;
@@ -140,7 +140,7 @@ bool Device::createEngineInstancedSubDevices() {
bool Device::createGenericSubDevices() {
UNRECOVERABLE_IF(!subdevices.empty());
uint32_t subDeviceCount = HwHelper::getSubDevicesCount(&getHardwareInfo());
uint32_t subDeviceCount = GfxCoreHelper::getSubDevicesCount(&getHardwareInfo());
subdevices.resize(subDeviceCount, nullptr);
@@ -214,8 +214,8 @@ bool Device::createDeviceImpl() {
this->executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->initDebugger();
}
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
if (getDebugger() && hwHelper.disableL3CacheForDebug(hwInfo)) {
auto &gfxCoreHelper = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily);
if (getDebugger() && gfxCoreHelper.disableL3CacheForDebug(hwInfo)) {
getGmmHelper()->forceAllResourcesUncached();
}
@@ -269,7 +269,7 @@ bool Device::createDeviceImpl() {
uuid.isValid = false;
if (DebugManager.flags.EnableChipsetUniqueUUID.get() != 0) {
if (HwHelper::get(hwInfo.platform.eRenderCoreFamily).isChipsetUniqueUUIDSupported()) {
if (GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).isChipsetUniqueUUIDSupported()) {
uuid.isValid = HwInfoConfig::get(hardwareInfo->platform.eProductFamily)->getUuid(this, uuid.id);
}
}
@@ -289,7 +289,7 @@ bool Device::createEngines() {
}
auto &hwInfo = getHardwareInfo();
auto gpgpuEngines = HwHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo);
auto gpgpuEngines = GfxCoreHelper::get(hwInfo.platform.eRenderCoreFamily).getGpgpuEngineInstances(hwInfo);
uint32_t deviceCsrIndex = 0;
for (auto &engine : gpgpuEngines) {
@@ -302,10 +302,10 @@ bool Device::createEngines() {
void Device::addEngineToEngineGroup(EngineControl &engine) {
const HardwareInfo &hardwareInfo = this->getHardwareInfo();
const HwHelper &hwHelper = NEO::HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const EngineGroupType engineGroupType = hwHelper.getEngineGroupType(engine.getEngineType(), engine.getEngineUsage(), hardwareInfo);
const GfxCoreHelper &gfxCoreHelper = NEO::GfxCoreHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const EngineGroupType engineGroupType = gfxCoreHelper.getEngineGroupType(engine.getEngineType(), engine.getEngineUsage(), hardwareInfo);
if (!hwHelper.isSubDeviceEngineSupported(hardwareInfo, getDeviceBitfield(), engine.getEngineType())) {
if (!gfxCoreHelper.isSubDeviceEngineSupported(hardwareInfo, getDeviceBitfield(), engine.getEngineType())) {
return;
}
@@ -591,8 +591,8 @@ EngineControl &Device::getNextEngineForCommandQueue() {
const auto &defaultEngine = this->getDefaultEngine();
const auto &hardwareInfo = this->getHardwareInfo();
const auto &hwHelper = NEO::HwHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const auto engineGroupType = hwHelper.getEngineGroupType(defaultEngine.getEngineType(), defaultEngine.getEngineUsage(), hardwareInfo);
const auto &gfxCoreHelper = NEO::GfxCoreHelper::get(hardwareInfo.platform.eRenderCoreFamily);
const auto engineGroupType = gfxCoreHelper.getEngineGroupType(defaultEngine.getEngineType(), defaultEngine.getEngineUsage(), hardwareInfo);
const auto defaultEngineGroupIndex = this->getEngineGroupIndexFromEngineGroupType(engineGroupType);
auto &engineGroup = this->getRegularEngineGroups()[defaultEngineGroupIndex];
@@ -757,7 +757,7 @@ void Device::allocateRTDispatchGlobals(uint32_t maxBvhLevels) {
bool allocFailed = false;
const auto deviceCount = HwHelper::getSubDevicesCount(executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->getHardwareInfo());
const auto deviceCount = GfxCoreHelper::getSubDevicesCount(executionEnvironment->rootDeviceEnvironments[getRootDeviceIndex()]->getHardwareInfo());
auto dispatchGlobalsSize = deviceCount * dispatchGlobalsStride;
auto rtStackSize = RayTracingHelper::getRTStackSizePerTile(*this, deviceCount, maxBvhLevels, extraBytesLocal, extraBytesGlobal);

View File

@@ -39,7 +39,7 @@ void Device::initializeCaps() {
auto addressing32bitAllowed = is64bit;
auto &productHelper = this->getRootDeviceEnvironment().getHelper<NEO::ProductHelper>();
auto &coreHelper = this->getRootDeviceEnvironment().getHelper<NEO::CoreHelper>();
auto &gfxCoreHelper = this->getRootDeviceEnvironment().getHelper<NEO::GfxCoreHelper>();
bool ocl21FeaturesEnabled = hwInfo.capabilityTable.supportsOcl21Features;
if (DebugManager.flags.ForceOCLVersion.get() != 0) {
@@ -81,9 +81,9 @@ void Device::initializeCaps() {
deviceInfo.globalMemSize = alignDown(deviceInfo.globalMemSize, MemoryConstants::pageSize);
deviceInfo.maxMemAllocSize = std::min(deviceInfo.globalMemSize, deviceInfo.maxMemAllocSize); // if globalMemSize was reduced for 32b
uint32_t subDeviceCount = coreHelper.getSubDevicesCount(&getHardwareInfo());
uint32_t subDeviceCount = gfxCoreHelper.getSubDevicesCount(&getHardwareInfo());
bool platformImplicitScaling = coreHelper.platformSupportsImplicitScaling(hwInfo);
bool platformImplicitScaling = gfxCoreHelper.platformSupportsImplicitScaling(hwInfo);
if (((NEO::ImplicitScalingHelper::isImplicitScalingEnabled(
getDeviceBitfield(), platformImplicitScaling))) &&
@@ -93,7 +93,7 @@ void Device::initializeCaps() {
if (!areSharedSystemAllocationsAllowed()) {
deviceInfo.maxMemAllocSize = ApiSpecificConfig::getReducedMaxAllocSize(deviceInfo.maxMemAllocSize);
deviceInfo.maxMemAllocSize = std::min(deviceInfo.maxMemAllocSize, coreHelper.getMaxMemAllocSize());
deviceInfo.maxMemAllocSize = std::min(deviceInfo.maxMemAllocSize, gfxCoreHelper.getMaxMemAllocSize());
}
// Some specific driver model configurations may impose additional limitations
@@ -120,7 +120,7 @@ void Device::initializeCaps() {
deviceInfo.numThreadsPerEU = 0;
auto simdSizeUsed = DebugManager.flags.UseMaxSimdSizeToDeduceMaxWorkgroupSize.get()
? CommonConstants::maximalSimdSize
: coreHelper.getMinimalSIMDSize();
: gfxCoreHelper.getMinimalSIMDSize();
deviceInfo.maxNumEUsPerSubSlice = (systemInfo.EuCountPerPoolMin == 0 || hwInfo.featureTable.flags.ftrPooledEuEnabled == 0)
? (systemInfo.EUCount / systemInfo.SubSliceCount)
@@ -134,7 +134,7 @@ void Device::initializeCaps() {
deviceInfo.maxNumEUsPerDualSubSlice = deviceInfo.maxNumEUsPerSubSlice;
}
deviceInfo.numThreadsPerEU = systemInfo.ThreadCount / systemInfo.EUCount;
deviceInfo.threadsPerEUConfigs = coreHelper.getThreadsPerEUConfigs();
deviceInfo.threadsPerEUConfigs = gfxCoreHelper.getThreadsPerEUConfigs();
auto maxWS = productHelper.getMaxThreadsForWorkgroupInDSSOrSS(hwInfo, static_cast<uint32_t>(deviceInfo.maxNumEUsPerSubSlice), static_cast<uint32_t>(deviceInfo.maxNumEUsPerDualSubSlice)) * simdSizeUsed;
maxWS = Math::prevPowerOfTwo(maxWS);
@@ -147,10 +147,10 @@ void Device::initializeCaps() {
deviceInfo.maxWorkItemSizes[0] = deviceInfo.maxWorkGroupSize;
deviceInfo.maxWorkItemSizes[1] = deviceInfo.maxWorkGroupSize;
deviceInfo.maxWorkItemSizes[2] = deviceInfo.maxWorkGroupSize;
deviceInfo.maxSamplers = coreHelper.getMaxNumSamplers();
deviceInfo.maxSamplers = gfxCoreHelper.getMaxNumSamplers();
deviceInfo.computeUnitsUsedForScratch = coreHelper.getComputeUnitsUsedForScratch(this->getRootDeviceEnvironment());
deviceInfo.maxFrontEndThreads = coreHelper.getMaxThreadsForVfe(hwInfo);
deviceInfo.computeUnitsUsedForScratch = gfxCoreHelper.getComputeUnitsUsedForScratch(this->getRootDeviceEnvironment());
deviceInfo.maxFrontEndThreads = gfxCoreHelper.getMaxThreadsForVfe(hwInfo);
deviceInfo.localMemSize = hwInfo.capabilityTable.slmSize * KB;
if (DebugManager.flags.OverrideSlmSize.get() != -1) {
@@ -166,7 +166,7 @@ void Device::initializeCaps() {
deviceInfo.printfBufferSize = 4 * MB;
deviceInfo.maxClockFrequency = hwInfo.capabilityTable.maxRenderFrequency;
deviceInfo.maxSubGroups = coreHelper.getDeviceSubGroupSizes();
deviceInfo.maxSubGroups = gfxCoreHelper.getDeviceSubGroupSizes();
deviceInfo.vmeAvcSupportsPreemption = hwInfo.capabilityTable.ftrSupportsVmeAvcPreemption;