321fc0490a
SWDEV-102417 - Forum [205433] : Memory leak with printf statement inside kernel code
A memory leak can occur if a printf statement is inside the .cl source code but it is not used inside the __kernel code (e.g., a function inside .cl code that uses printf but never called by the __kernel). In this case compiler generates the printf metadata but printf is not used by the __kernel (i.e., the printf buffer is empty).
To fix this issue, release the transfer buffer object before returning false in PrintfDbgHSA::output function.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/11394/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprintf.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprintf.cpp#3 edit
[ROCm/clr commit: 0dd7a03954]