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;