Revert "refactor: add validateWorkgroupSize() method"

This reverts commit 708b81bab5.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2025-06-07 16:53:41 +02:00
committed by Compute-Runtime-Automation
parent 6d7148ee5e
commit 9fd521f471
3 changed files with 7 additions and 15 deletions

View File

@@ -375,17 +375,6 @@ ze_result_t KernelImp::setGroupSize(uint32_t groupSizeX, uint32_t groupSizeY,
patchWorkgroupSizeInCrossThreadData(groupSizeX, groupSizeY, groupSizeZ);
auto simdSize = kernelDescriptor.kernelAttributes.simdSize;
auto grfCount = kernelDescriptor.kernelAttributes.numGrfRequired;
auto neoDevice = module->getDevice()->getNEODevice();
auto &rootDeviceEnvironment = neoDevice->getRootDeviceEnvironment();
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<NEO::GfxCoreHelper>();
this->numThreadsPerThreadGroup = gfxCoreHelper.calculateNumThreadsPerThreadGroup(
simdSize, static_cast<uint32_t>(itemsInGroup), grfCount, rootDeviceEnvironment);
if (auto wgSizeRet = validateWorkgroupSize(); wgSizeRet != ZE_RESULT_SUCCESS) {
return wgSizeRet;
}
auto remainderSimdLanes = itemsInGroup & (simdSize - 1u);
threadExecutionMask = static_cast<uint32_t>(maxNBitValue(remainderSimdLanes));
if (!threadExecutionMask) {
@@ -393,6 +382,13 @@ ze_result_t KernelImp::setGroupSize(uint32_t groupSizeX, uint32_t groupSizeY,
}
evaluateIfRequiresGenerationOfLocalIdsByRuntime(kernelDescriptor);
auto grfCount = kernelDescriptor.kernelAttributes.numGrfRequired;
auto neoDevice = module->getDevice()->getNEODevice();
auto &rootDeviceEnvironment = neoDevice->getRootDeviceEnvironment();
auto &gfxCoreHelper = rootDeviceEnvironment.getHelper<NEO::GfxCoreHelper>();
this->numThreadsPerThreadGroup = gfxCoreHelper.calculateNumThreadsPerThreadGroup(
simdSize, static_cast<uint32_t>(itemsInGroup), grfCount, rootDeviceEnvironment);
if (kernelRequiresGenerationOfLocalIdsByRuntime) {
auto grfSize = this->module->getDevice()->getHwInfo().capabilityTable.grfSize;
uint32_t perThreadDataSizeForWholeThreadGroupNeeded =

View File

@@ -251,7 +251,6 @@ struct KernelImp : Kernel {
virtual void evaluateIfRequiresGenerationOfLocalIdsByRuntime(const NEO::KernelDescriptor &kernelDescriptor) = 0;
void *patchBindlessSurfaceState(NEO::GraphicsAllocation *alloc, uint32_t bindless);
uint32_t getSurfaceStateIndexForBindlessOffset(NEO::CrossThreadDataOffset bindlessOffset) const;
ze_result_t validateWorkgroupSize() const;
const KernelImmutableData *kernelImmData = nullptr;
Module *module = nullptr;

View File

@@ -14,7 +14,4 @@ KernelExt *KernelImp::getExtension(uint32_t extensionType) { return nullptr; }
void KernelImp::patchRegionParams(const CmdListKernelLaunchParams &launchParams, const ze_group_count_t &threadGroupDimensions) {}
ze_result_t KernelImp::validateWorkgroupSize() const {
return ZE_RESULT_SUCCESS;
}
} // namespace L0