P4 to Git Change 2021171 by gandryey@gera-win10 on 2019/10/29 12:06:07

SWDEV-208424 - ROCr language runtime should not free code object until executable destroy
	- Reshuffle the code to make sure HSA runtime can keep the pointer to the code object

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#67 edit


[ROCm/clr commit: 783f1a506c]
This commit is contained in:
foreman
2019-10-29 12:23:34 -04:00
parent 5591526562
commit 048e47d190
@@ -1568,16 +1568,17 @@ bool Program::linkImplLC(amd::option::Options* options) {
return false;
}
if (!setKernels(options, executable, executableSize)) {
return false;
}
// Save the binary and type
clBinary()->saveBIFBinary(executable, executableSize);
// Destroy original memory with executable after compilation
delete[] executable;
if (!setKernels(options, const_cast<void*>(clBinary()->data().first),
clBinary()->data().second)) {
return false;
}
setType(TYPE_EXECUTABLE);
return true;