From 4da46684d8d997b4b5fceff3e189a53e24444055 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 22 Sep 2015 11:22:00 -0400 Subject: [PATCH] P4 to Git Change 1193032 by emankov@em-hsa-amd on 2015/09/22 11:03:08 SWDEV-17662 - ORCA RT: fix for continuing work after Program link failure. [Synopsis] If program link is failed RT continues its work and fails further (for example, in symbol.setDeviceKernel). [Testing] pre check-in Reviewer: German Andryeyev Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#207 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#70 edit [ROCm/clr commit: ca0a125f9716acc957216381021e52be86513764] --- projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp | 1 + projects/clr/rocclr/runtime/platform/program.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp b/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp index 7c080f9f89..b78e56b243 100644 --- a/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp +++ b/projects/clr/rocclr/runtime/device/gpu/gpuprogram.cpp @@ -1819,6 +1819,7 @@ HSAILProgram::linkImpl( binaries_to_link[0], binaries_to_link.size() - 1, &binaries_to_link[1], ACL_TYPE_LLVMIR_BINARY, "-create-library", NULL); if (errorCode != ACL_SUCCESS) { + buildLog_ += aclGetCompilerLog(dev().hsaCompiler()); buildLog_ +="Error while linking : \ aclLink failed" ; return false; diff --git a/projects/clr/rocclr/runtime/platform/program.cpp b/projects/clr/rocclr/runtime/platform/program.cpp index 2e1300a9e4..c579b7f6a1 100644 --- a/projects/clr/rocclr/runtime/platform/program.cpp +++ b/projects/clr/rocclr/runtime/platform/program.cpp @@ -354,6 +354,10 @@ Program::link( } } + if (retval != CL_SUCCESS) { + return retval; + } + // Rebuild the symbol table deviceprograms_t::iterator sit; for (sit = devicePrograms_.begin(); sit != devicePrograms_.end(); ++sit) {