Remove executionEnvironment from KernelInfo

Related-To: NEO-3739
This commit is contained in:
Krystian Chmielewski
2020-11-19 12:30:44 +01:00
committed by Compute-Runtime-Automation
parent 96bc6b2e01
commit 4948c39d39
70 changed files with 310 additions and 562 deletions

View File

@@ -136,8 +136,7 @@ WorkSizeInfo::WorkSizeInfo(const DispatchInfo &dispatchInfo) {
auto rootDeviceIndex = device.getRootDeviceIndex();
const auto &kernelInfo = dispatchInfo.getKernel()->getKernelInfo(rootDeviceIndex);
this->maxWorkGroupSize = dispatchInfo.getKernel()->getMaxKernelWorkGroupSize(rootDeviceIndex);
auto pExecutionEnvironment = kernelInfo.patchInfo.executionEnvironment;
this->hasBarriers = (pExecutionEnvironment != nullptr) && (pExecutionEnvironment->HasBarriers);
this->hasBarriers = kernelInfo.kernelDescriptor.kernelAttributes.usesBarriers();
this->simdSize = static_cast<uint32_t>(kernelInfo.getMaxSimdSize());
this->slmTotalSize = static_cast<uint32_t>(dispatchInfo.getKernel()->slmTotalSize);
this->coreFamily = device.getHardwareInfo().platform.eRenderCoreFamily;
@@ -185,7 +184,6 @@ KernelInfo::~KernelInfo() {
}
void KernelInfo::storePatchToken(const SPatchExecutionEnvironment *execEnv) {
this->patchInfo.executionEnvironment = execEnv;
if (execEnv->CompiledForGreaterThan4GBBuffers == false) {
this->requiresSshForBuffers = true;
}

View File

@@ -140,26 +140,13 @@ struct KernelInfo {
size_t getBorderColorStateSize() const;
size_t getBorderColorOffset() const;
unsigned int getMaxSimdSize() const {
const auto executionEnvironment = patchInfo.executionEnvironment;
if (executionEnvironment == nullptr || executionEnvironment->LargestCompiledSIMDSize == 1) {
return 1;
}
if (executionEnvironment->CompiledSIMD32) {
return 32;
}
if (executionEnvironment->CompiledSIMD16) {
return 16;
}
return 8;
return kernelDescriptor.kernelAttributes.simdSize;
}
bool hasDeviceEnqueue() const {
return patchInfo.executionEnvironment ? !!patchInfo.executionEnvironment->HasDeviceEnqueue : false;
return kernelDescriptor.kernelAttributes.flags.usesDeviceSideEnqueue;
}
bool requiresSubgroupIndependentForwardProgress() const {
return patchInfo.executionEnvironment ? !!patchInfo.executionEnvironment->SubgroupIndependentForwardProgressRequired : false;
return kernelDescriptor.kernelAttributes.flags.requiresSubgroupIndependentForwardProgress;
}
size_t getMaxRequiredWorkGroupSize(size_t maxWorkGroupSize) const {
auto requiredWorkGroupSizeX = kernelDescriptor.kernelAttributes.requiredWorkgroupSize[0];

View File

@@ -62,7 +62,6 @@ struct PatchInfo {
imageMemObjKernelArgs;
const SPatchDataParameterStream *dataParameterStream = nullptr;
const SPatchThreadPayload *threadPayload = nullptr;
const SPatchExecutionEnvironment *executionEnvironment = nullptr;
const SPatchKernelAttributesInfo *pKernelAttributesInfo = nullptr;
const SPatchAllocateStatelessPrivateSurface *pAllocateStatelessPrivateSurface = nullptr;
const SPatchAllocateSyncBuffer *pAllocateSyncBuffer = nullptr;