mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
Add resolves for stateless compression with shared buffer
Related-To: NEO-5107 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
c73f10c2be
commit
0a8b473f3c
@@ -2530,6 +2530,19 @@ void Kernel::fillWithKernelObjsForAuxTranslation(KernelObjsForAuxTranslation &ke
|
||||
}
|
||||
}
|
||||
|
||||
bool Kernel::hasDirectStatelessAccessToSharedBuffer() const {
|
||||
for (uint32_t i = 0; i < getKernelArgsNumber(); i++) {
|
||||
const auto &arg = kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[i];
|
||||
if (BUFFER_OBJ == kernelArguments.at(i).type && !arg.as<ArgDescPointer>().isPureStateful()) {
|
||||
auto buffer = castToObject<Buffer>(getKernelArg(i));
|
||||
if (buffer && buffer->getMultiGraphicsAllocation().getAllocationType() == GraphicsAllocation::AllocationType::SHARED_BUFFER) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Kernel::hasDirectStatelessAccessToHostMemory() const {
|
||||
for (uint32_t i = 0; i < getKernelArgsNumber(); i++) {
|
||||
const auto &arg = kernelInfo.kernelDescriptor.payloadMappings.explicitArgs[i];
|
||||
@@ -2848,7 +2861,9 @@ bool Kernel::requiresLimitedWorkgroupSize() const {
|
||||
void Kernel::updateAuxTranslationRequired() {
|
||||
const auto &hwInfoConfig = *HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily);
|
||||
if (hwInfoConfig.allowStatelessCompression(getDevice().getHardwareInfo())) {
|
||||
if (hasDirectStatelessAccessToHostMemory() || hasIndirectStatelessAccessToHostMemory()) {
|
||||
if (hasDirectStatelessAccessToHostMemory() ||
|
||||
hasIndirectStatelessAccessToHostMemory() ||
|
||||
hasDirectStatelessAccessToSharedBuffer()) {
|
||||
setAuxTranslationRequired(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -514,6 +514,7 @@ class Kernel : public ReferenceTrackedObject<Kernel> {
|
||||
void resolveArgs();
|
||||
|
||||
void reconfigureKernel();
|
||||
bool hasDirectStatelessAccessToSharedBuffer() const;
|
||||
bool hasDirectStatelessAccessToHostMemory() const;
|
||||
bool hasIndirectStatelessAccessToHostMemory() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user