mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
Enable support for indirect allocation access to Kernels
Change-Id: I3ded8cce3761a38aa4a4d71b4089f79c844311c5 Signed-off-by: Raiyan Latif <raiyan.latif@intel.com>
This commit is contained in:
@@ -64,6 +64,8 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::executeCommandListImmediate(bo
|
||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
||||
ze_result_t CommandListCoreFamily<gfxCoreFamily>::close() {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
|
||||
commandContainer.removeDuplicatesFromResidencyContainer();
|
||||
NEO::EncodeBatchBufferStartOrEnd<GfxFamily>::programBatchBufferEnd(commandContainer);
|
||||
|
||||
return ZE_RESULT_SUCCESS;
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "shared/source/helpers/register_offsets.h"
|
||||
#include "shared/source/helpers/simd_helper.h"
|
||||
#include "shared/source/memory_manager/memory_manager.h"
|
||||
#include "shared/source/memory_manager/residency_container.h"
|
||||
#include "shared/source/unified_memory/unified_memory.h"
|
||||
|
||||
#include <algorithm>
|
||||
@@ -43,11 +44,12 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchFunctionWithParams
|
||||
prepareIndirectParams(pThreadGroupDimensions);
|
||||
}
|
||||
|
||||
auto csr = device->getNEODevice()->getDefaultEngine().commandStreamReceiver;
|
||||
|
||||
UnifiedMemoryControls unifiedMemoryControls = function->getUnifiedMemoryControls();
|
||||
if (function->hasIndirectAllocationsAllowed()) {
|
||||
device->getDriverHandle()->getSvmAllocsManager()->makeInternalAllocationsResident(*csr, unifiedMemoryControls.generateMask());
|
||||
UnifiedMemoryControls unifiedMemoryControls = function->getUnifiedMemoryControls();
|
||||
auto svmAllocsManager = device->getDriverHandle()->getSvmAllocsManager();
|
||||
auto &residencyContainer = commandContainer.getResidencyContainer();
|
||||
|
||||
svmAllocsManager->addInternalAllocationsToResidencyContainer(residencyContainer, unifiedMemoryControls.generateMask());
|
||||
}
|
||||
|
||||
NEO::EncodeDispatchKernel<GfxFamily>::encode(commandContainer,
|
||||
|
||||
Reference in New Issue
Block a user