Insert scratch memory into scratch cache on full profile systems.
Scratch cache was not updated for IOMMUv2 systems previously.
This both negates the cache and causes segfault during scratch
release.
Change-Id: I71e81d6b642d65ca135868ff7225ea173529d458
[ROCm/ROCR-Runtime commit: 191664cd20]
Cette révision appartient à :
1 Parent
519b7d4642
révision
e2aca270b7
1 fichier modifié
+7
-9
@@ -1136,15 +1136,13 @@ void GpuAgent::AcquireQueueScratch(ScratchInfo& scratch) {
|
||||
assert(((!scratch.large) | use_reclaim) && "Large scratch used with reclaim disabled.");
|
||||
|
||||
if (scratch.queue_base != nullptr) {
|
||||
if (profile_ == HSA_PROFILE_FULL) return;
|
||||
if (profile_ == HSA_PROFILE_BASE) {
|
||||
HSAuint64 alternate_va;
|
||||
if (hsaKmtMapMemoryToGPU(scratch.queue_base, scratch.size, &alternate_va) ==
|
||||
HSAKMT_STATUS_SUCCESS) {
|
||||
if (scratch.large) scratch_used_large_ += scratch.size;
|
||||
scratch_cache_.insert(scratch);
|
||||
return;
|
||||
}
|
||||
HSAuint64 alternate_va;
|
||||
if ((profile_ == HSA_PROFILE_FULL) ||
|
||||
(hsaKmtMapMemoryToGPU(scratch.queue_base, scratch.size, &alternate_va) ==
|
||||
HSAKMT_STATUS_SUCCESS)) {
|
||||
if (scratch.large) scratch_used_large_ += scratch.size;
|
||||
scratch_cache_.insert(scratch);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur