P4 to Git Change 1768245 by wchau@wchau_OCL_Linux on 2019/04/10 22:01:33

SWDEV-165259 - Update OpenCL runtime to support MsgPack metadata
	- Fixed the missing support of Printf for CO v3
	- Added back the flag to disable CO v3 for the non-COMGR environment

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#40 edit


[ROCm/clr commit: 90271b9b75]
This commit is contained in:
foreman
2019-04-10 22:15:35 -04:00
parent a232bdf961
commit 959a60b91c
2 changed files with 4 additions and 1 deletions
@@ -1386,7 +1386,8 @@ bool Kernel::GetPrintfStr(const amd_comgr_metadata_node_t programMD,
amd_comgr_metadata_node_t printfMeta;
amd_comgr_status_t status = amd::Comgr::metadata_lookup(programMD, "Printf", &printfMeta);
amd_comgr_status_t status = amd::Comgr::metadata_lookup(programMD,
codeObjectVer() == 2 ? "Printf" : "amdhsa.printf", &printfMeta);
if (status != AMD_COMGR_STATUS_SUCCESS) {
return true; // printf string metadata is not provided so just exit
}
@@ -1760,6 +1760,8 @@ bool Program::linkImplLC(amd::option::Options* options) {
std::ostream_iterator<std::string>(ostrstr, " "));
codegenOptions.append(" ").append(ostrstr.str());
// Force object code v2.
codegenOptions.append(" -mno-code-object-v3");
// Set whole program mode
codegenOptions.append(" -mllvm -amdgpu-internalize-symbols -mllvm -amdgpu-early-inline-all");