P4 to Git Change 1062136 by jatang@jatang-opencl-hsa-stg2 on 2014/08/01 14:19:58

EPR #402950 - Properly align the scratch buffer to 64K.

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#452 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#189 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/include/cal/calcl.h#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#95 edit


[ROCm/clr commit: 268ff9830e]
This commit is contained in:
foreman committed 2014-08-01 14:32:36 -04:00
1 parent 3b35326a74
commit 4ea764d485
4 files changed
+11 -4

No files matched your search

@@ -2289,9 +2289,8 @@ Device::allocScratch(uint regNum, const VirtualGPU* vgpu)
ScopedLockVgpus lock(*this);
std::vector<Memory*>& mems = scratch_[s]->memObjs_;
// Calculate the size of the new buffer +
// (64 Ki) for alignment with generic address space
size_t size = calcScratchBufferSize(regNum) + 64 * Ki;
// Calculate the size of the new buffer
size_t size = calcScratchBufferSize(regNum);
scratch_[s]->destroyMemory();