Check indirect access from igc

Related-To: NEO-7182

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2022-07-15 13:07:45 +00:00
committed by Compute-Runtime-Automation
parent 4d80f38adc
commit e14c91fa6c
8 changed files with 24 additions and 13 deletions

View File

@ -258,7 +258,8 @@ cl_int Kernel::initialize() {
this->kernelHasIndirectAccess |= kernelInfo.kernelDescriptor.kernelAttributes.hasNonKernelArgLoad ||
kernelInfo.kernelDescriptor.kernelAttributes.hasNonKernelArgStore ||
kernelInfo.kernelDescriptor.kernelAttributes.hasNonKernelArgAtomic;
kernelInfo.kernelDescriptor.kernelAttributes.hasNonKernelArgAtomic ||
kernelInfo.hasIndirectStatelessAccess;
provideInitializationHints();
// resolve the new kernel info to account for kernel handlers
@ -1251,9 +1252,9 @@ void Kernel::makeResident(CommandStreamReceiver &commandStreamReceiver) {
gtpinNotifyMakeResident(this, &commandStreamReceiver);
if (unifiedMemoryControls.indirectDeviceAllocationsAllowed ||
unifiedMemoryControls.indirectHostAllocationsAllowed ||
unifiedMemoryControls.indirectSharedAllocationsAllowed) {
if (this->kernelHasIndirectAccess && (unifiedMemoryControls.indirectDeviceAllocationsAllowed ||
unifiedMemoryControls.indirectHostAllocationsAllowed ||
unifiedMemoryControls.indirectSharedAllocationsAllowed)) {
this->getContext().getSVMAllocsManager()->makeInternalAllocationsResident(commandStreamReceiver, unifiedMemoryControls.generateMask());
}
}