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