From 914de58a29a92cb31196be38f1bc0a5cff45b070 Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 5 Apr 2018 13:42:10 -0400 Subject: [PATCH] P4 to Git Change 1537173 by gandryey@gera-w8 on 2018/04/05 13:34:21 SWDEV-149190 - [CQE OCL][DTB-BLOCKER][WIN][LNX][QR]observed soft hang while running oclruntime sub-test of ocltst due to faulty CL#1529531 - Better solution for CL#1537141. Use the offset in the bind for the thread trace object Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palthreadtrace.cpp#6 edit --- rocclr/runtime/device/pal/palthreadtrace.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rocclr/runtime/device/pal/palthreadtrace.cpp b/rocclr/runtime/device/pal/palthreadtrace.cpp index b7da255341..0ac1499063 100644 --- a/rocclr/runtime/device/pal/palthreadtrace.cpp +++ b/rocclr/runtime/device/pal/palthreadtrace.cpp @@ -58,11 +58,7 @@ bool PalThreadTraceReference::finalize() { // Acquire GPU memory for the query from the pool and bind it. Pal::GpuMemoryRequirements gpuMemReqs = {}; iPerf()->GetGpuMemoryRequirements(&gpuMemReqs); - // Note: Pal:::PerfExperiments can't apply the runtime offsets for suballocaiotns, - // thus disable suballocation. - Pal::gpusize bufSize = std::max(gpuMemReqs.size, - gpu_.dev().settings().subAllocationMaxSize_ + gpuMemReqs.alignment); - memory_ = new Memory(gpu().dev(), amd::alignUp(bufSize, gpuMemReqs.alignment)); + memory_ = new Memory(gpu().dev(), amd::alignUp(gpuMemReqs.size, gpuMemReqs.alignment)); if (nullptr == memory_) { return false; @@ -74,7 +70,7 @@ bool PalThreadTraceReference::finalize() { gpu_.queue(gpu_.engineID_).addMemRef(memory_->iMem()); - result = iPerf()->BindGpuMemory(memory_->iMem(), 0); + result = iPerf()->BindGpuMemory(memory_->iMem(), memory_->offset()); if (result != Pal::Result::Success) { return false;