On GFX9+ amd_queue_t.scratch_backing_memory_location must store the queue's scratch backing store VA, not the offset.
Also fix permission in couple files.
Change-Id: I4203f8e5a36406b20562d8943ea5c341847f039a
[ROCm/ROCR-Runtime commit: 8aa19388a9]
이 커밋은 다음에 포함됨:
1 부모
65f6986835
커밋
ef38e563ba
3 파일이 변경됨
+9
-2
검색과 일치하는 파일 없음
파일 모드가 변경됨.
@@ -936,6 +936,8 @@ hsa_status_t GpuAgent::QueueCreate(size_t size, hsa_queue_type32_t queue_type,
|
||||
}
|
||||
|
||||
void GpuAgent::AcquireQueueScratch(ScratchInfo& scratch) {
|
||||
bool need_queue_scratch_base = (isa_->GetMajorVersion() > 8);
|
||||
|
||||
if (scratch.size == 0) {
|
||||
scratch.size = queue_scratch_len_;
|
||||
scratch.size_per_thread = scratch_per_thread_;
|
||||
@@ -943,7 +945,10 @@ void GpuAgent::AcquireQueueScratch(ScratchInfo& scratch) {
|
||||
|
||||
ScopedAcquire<KernelMutex> lock(&scratch_lock_);
|
||||
scratch.queue_base = scratch_pool_.alloc(scratch.size);
|
||||
scratch.queue_process_offset = uintptr_t(scratch.queue_base) - uintptr_t(scratch_pool_.base());
|
||||
scratch.queue_process_offset =
|
||||
(need_queue_scratch_base)
|
||||
? uintptr_t(scratch.queue_base)
|
||||
: uintptr_t(scratch.queue_base) - uintptr_t(scratch_pool_.base());
|
||||
|
||||
if (scratch.queue_base != NULL) {
|
||||
if (profile_ == HSA_PROFILE_FULL) return;
|
||||
@@ -981,7 +986,9 @@ void GpuAgent::AcquireQueueScratch(ScratchInfo& scratch) {
|
||||
scratch.queue_base = base;
|
||||
scratch.size = size;
|
||||
scratch.queue_process_offset =
|
||||
uintptr_t(scratch.queue_base) - uintptr_t(scratch_pool_.base());
|
||||
(need_queue_scratch_base)
|
||||
? uintptr_t(scratch.queue_base)
|
||||
: uintptr_t(scratch.queue_base) - uintptr_t(scratch_pool_.base());
|
||||
return;
|
||||
}
|
||||
scratch_pool_.free(base);
|
||||
|
||||
파일 모드가 변경됨.
새 이슈에서 참조
사용자 차단