From 9496b2156cb967a96617536b1f032d497bf5bbba Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 12 Aug 2019 17:40:58 -0400
Subject: [PATCH] P4 to Git Change 1982021 by gandryey@gera-win10 on 2019/08/12
17:34:58
SWDEV-79445 - OCL generic changes and code clean-up
- Following CL#1981122. Update privateMemSize_ for all scratch buffers.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#153 edit
---
rocclr/runtime/device/pal/paldevice.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/pal/paldevice.cpp b/rocclr/runtime/device/pal/paldevice.cpp
index 914e588b2f..32d7bb063a 100644
--- a/rocclr/runtime/device/pal/paldevice.cpp
+++ b/rocclr/runtime/device/pal/paldevice.cpp
@@ -2011,7 +2011,6 @@ bool Device::allocScratch(uint regNum, const VirtualGPU* vgpu, uint vgprs) {
ScopedLockVgpus lock(*this);
scratch_[sb]->size_ = newSize;
- scratch_[sb]->privateMemSize_ = regNum * sizeof(uint32_t);
uint64_t size = 0;
uint64_t offset = 0;
@@ -2025,6 +2024,7 @@ bool Device::allocScratch(uint regNum, const VirtualGPU* vgpu, uint vgprs) {
scratchBuf->size_ = std::min(newSize, uint64_t(3 * Gi));
// Note: Generic address space setup in HW requires 64KB alignment for scratch
scratchBuf->size_ = amd::alignUp(newSize, 64 * Ki);
+ scratchBuf->privateMemSize_ = regNum * sizeof(uint32_t);
scratchBuf->offset_ = offset;
size += scratchBuf->size_;
offset += scratchBuf->size_;