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
Этот коммит содержится в:
foreman committed 2019-10-29 12:23:34 -04:00
1 родитель c081898145
Коммит 783f1a506c
1 file changed
+5 -4
+5 -4
Просмотреть файл
@@ -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;