SWDEV-83192 - [CQE OCL][2.0][QR] Few MCLSubtests are falling due to faulty cl#1208929
[Synopsis]
Failure is because of additional check on compilation options existence in binary, which are expected in a separate section in the input binary. Options are expected on HSAIL path in order to make a decision whether to recompile or not the input code. AMDIL path has another strategy for recompilation algorithm and doesn't need options to be obligatory presented in input binary.
[Solution]
Remove options existence check in the input binary when compiling from BINARY_TYPE_ELF.
P.S.
With the fix HSAIL path also doesnt require compilation options existence in input binary anymore. Recompilation will be done silently in such case.
[Testing]
Pre checkin, MCL
Reviewed by Evgeniy Mankov, Nikolay Haustov, German Andryeyev
http://ocltc.amd.com/reviews/r/9560/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#77 edit
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Integrate new algorithm for device program choice.
[Reasons]
1. Make the switching change as less as possible.
2. Give a chance to test HSA_foundation device work on OCL 1.2 beforehand (asked by Nikolay).
Almost already reviewed:
http://ocltc.amd.com/reviews/r/8850/
Additionally:
1. Linking logic was changed: if the target of one of the binaries is hsail-(64) linking goes through HSAIL, otherwise - through AMDIL. Previously -cl-std=CL2.0 in any of the linking binaries was a criterion for HSAIL, what will be wrong for HSAIL 1.2 after switching. -clang & -edg options are set now to distinguish the path while linking.
2. -cl-std=CL2.0 as a criterion for HSAIL was returned back in isHSAILProgram() method; -clang & -edg options were also added as a criterion.
[ToDo] After enabling HSAIL by default remove -cl-std, -clang & -edg checks from the code.
[Testing] Pre-checkin
http://ocltc.amd.com:8111/viewModification.html?modId=61929&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true
[Reviewers] German Andryeyev, Nikolay Haustov
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_program.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.cpp#279 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpudevice.hpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#261 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#534 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#154 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.cpp#47 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/hsa_foundation/hsadevice.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#76 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#38 edit
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Fix error (by CL 1205606) in parsing option algorithm.
Compile/link options should be parsed once with additional options specified by AMD_OCL_BUILD(LINK)_OPTIONS(_APPEND) in case of optionChangable or without them, but once.
One static method for parsing all options in ORCA RT is created:
static bool ParseAllOptions(const std::string& options,
option::Options& parsedOptions,
bool optionChangable = true,
bool linkOptsOnly = false)
[Testing] Pre-checkin
[Reviewers] German Andryeyev, Nikolay Haustov
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#37 edit
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Minor refactoring of compile/link options' routines.
[Testing] pre check-in
[Reviewer] German Andryeyev
http://ocltc.amd.com/reviews/r/8848
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#36 edit
SWDEV-77584 - ORCA RT: Preparations for enabling HSAIL on OpenCL 1.2 by default. Renaming Program::isIL_ to isSPIRV_.
[Reason] Avoiding ambiguity with SPIR, which is also IL, but is supported by legacy AMDIL only, whereas SPIRV is supported only by HSAIL. From OpenCL Program constructor's point it isn't obvious.
[Testing] pre check-in
[Reviewer] German Andryeyev, Yaxun Liu
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#73 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#35 edit
SWDEV-77584 - HSA HLC: fixed reflection metadata generation on HSAIL OCL 1.2 path
We are producing 6 extra arguments, but metadata was produced only for 3.
Removed KE_OCL12_NUM_ARGS define to avoid confusion.
Testing: smoke, precheckin
Reviewed by Yaxun Liu
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/llvm/include/llvm/AMDOpenCLKernenv.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Transforms/Scalar/AMDInsertOpenCLKernenv.cpp#10 edit
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
ECR #333753 - ORCA RT: fix for continuing work after Program build failure.
[Synopsis]
If program build (compile or link) is failed RT continues its work and fails further (for example, in symbol.setDeviceKernel). It was hard to find out the real failure (HSAILProgram::linkImpl) due to buildLog, which is printed once in the end, and due to abscence of LogError function call.
[Misc]
+ Error handling improvement in HSAILProgram::linkImpl and some others. ToDo: Do the same for the rest.
+ LogError() is added to Program::build/compile/link
[Testing] pre check-in
Reviewer: German Andryeyev
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#184 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#206 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#65 edit