From 5a2827406ecc0fc745718f665f77a16e60e7307b Mon Sep 17 00:00:00 2001 From: foreman Date: Thu, 3 Nov 2016 18:14:18 -0400 Subject: [PATCH] P4 to Git Change 1336294 by gandryey@gera-w8 on 2016/11/03 17:50:35 SWDEV-86035 - Add PAL backend to OpenCL - Use size() method in the segment freeze instead of vmSize(), because vmSize() is aligned in PAL and different heaps may have different alignments Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#21 edit [ROCm/clr commit: 30b62e264cb6ef542b2a337a41155cd9a245082c] --- projects/clr/rocclr/runtime/device/pal/palprogram.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/pal/palprogram.cpp b/projects/clr/rocclr/runtime/device/pal/palprogram.cpp index 4e9ed615a5..7193825b1d 100644 --- a/projects/clr/rocclr/runtime/device/pal/palprogram.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palprogram.cpp @@ -120,8 +120,9 @@ Segment::freeze(bool destroySysmem) VirtualGPU& gpu = *gpuAccess_->dev().xferQueue(); bool result = true; if (cpuAccess_ != nullptr) { + assert(gpuAccess_->size() == cpuAccess_->size() && "Backing store size mismatch!"); result = cpuAccess_->partialMemCopyTo(gpu, - 0, 0, gpuAccess_->vmSize(), *gpuAccess_, false, true); + 0, 0, gpuAccess_->size(), *gpuAccess_, false, true); gpu.releaseMemObjects(); gpu.waitAllEngines(); }