mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
fix: chunking prefetch add USER_FENCE
Add USER_FENCE before PREFETCH call and after the BIND Related-To: NEO-8098 Signed-off by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com> Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f43e6cc795
commit
2403212dcd
@@ -182,7 +182,11 @@ bool DrmAllocation::setCacheAdvice(Drm *drm, size_t regionSize, CacheRegion regi
|
||||
return true;
|
||||
}
|
||||
|
||||
int DrmAllocation::prefetchBOWithChunking(Drm *drm) {
|
||||
bool DrmAllocation::prefetchBOWithChunking(Drm *drm) {
|
||||
if (!(NEO::DebugManager.flags.EnableBOChunkingPrefetch.get())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto getSubDeviceIds = [](const DeviceBitfield &subDeviceBitfield) {
|
||||
SubDeviceIdsVec subDeviceIds;
|
||||
for (auto subDeviceId = 0u; subDeviceId < subDeviceBitfield.size(); subDeviceId++) {
|
||||
|
||||
@@ -124,7 +124,7 @@ class DrmAllocation : public GraphicsAllocation {
|
||||
this->osContext = context;
|
||||
}
|
||||
|
||||
int prefetchBOWithChunking(Drm *drm);
|
||||
bool prefetchBOWithChunking(Drm *drm);
|
||||
MOCKABLE_VIRTUAL int makeBOsResident(OsContext *osContext, uint32_t vmHandleId, std::vector<BufferObject *> *bufferObjects, bool bind);
|
||||
MOCKABLE_VIRTUAL int bindBO(BufferObject *bo, OsContext *osContext, uint32_t vmHandleId, std::vector<BufferObject *> *bufferObjects, bool bind);
|
||||
MOCKABLE_VIRTUAL int bindBOs(OsContext *osContext, uint32_t vmHandleId, std::vector<BufferObject *> *bufferObjects, bool bind);
|
||||
|
||||
@@ -65,12 +65,6 @@ MemoryOperationsStatus DrmMemoryOperationsHandlerBind::makeResidentWithinOsConte
|
||||
}
|
||||
}
|
||||
|
||||
if (bo->isChunked) {
|
||||
auto memoryManager = static_cast<DrmMemoryManager *>(this->rootDeviceEnvironment.executionEnvironment.memoryManager.get());
|
||||
auto drm = &memoryManager->getDrm(drmAllocation->getRootDeviceIndex());
|
||||
drmAllocation->prefetchBOWithChunking(drm);
|
||||
}
|
||||
|
||||
if (!evictable) {
|
||||
drmAllocation->updateResidencyTaskCount(GraphicsAllocation::objectAlwaysResident, osContext->getContextId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user