SWDEV-204999 - [hipclang-vdi-rocm] TF unit test tracking.util_xla_test_gpu fails to run
- Fix a regression with 32bit binaries in HSAIL mode
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#28 edit
SWDEV-204999 - [hipclang-vdi-rocm] TF unit test tracking.util_xla_test_gpu fails to run
- Change the HSACO detection logic to use e_machine
- Allow to load a binary without any kernel.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#63 edit
SWDEV-102733 - Update some CMakeLists.txt files:
- when setting CMAKE_CXX_FLAGS, append to it rather than overwriting it.
- some linker flags, -Wl,--unresolved-symbols=report-all being one of them, requires -shared-libasan if using -fsanitize=address.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#13 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/CMakeLists.txt#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#9 edit
... //depot/stg/opencl/drivers/opencl/tools/clinfo/CMakeLists.txt#5 edit
SWDEV-102733 - [OCL-LC-ROCm] Cmake build Write CMakeLists.txt to enable building with and without the DK environment
- Make it possible to build with libstdc++
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/appprofile.cpp#16 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/roccompiler.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#63 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#126 edit
... //depot/stg/opencl/drivers/opencl/runtime/thread/semaphore.cpp#9 edit
SWDEV-79309 - [ROCm][OCLonLC][AMDGPU asm] OclElf: Correctly skip symbols which have special section indexes.
[Issues]
Kernels which contain absolute symbols can't be run. Error message looks like:
"OclElf::getSymbolInfo() failed in gelf_getshdr() - Invalid argument."
[Reason]
Symbols which have special section indexes (e.g. absolute symbols)
are incorrectly handled by the compiler library.
[Solution]
Correctly skip symbols which have special section indexes in the loader.
Promote the fix into compiler/legacy-lib at once.
[Remarks/Misc]
Absolute symbols do not normally produced by OpenCL compiler,
but may come from kernels written in assembly language.
AMDGPU asm exports all symbols, even ABSOLUTE LOCAL HIDDEN INTERNAL etc.
Impossibility to disable export of useless symbols is known issue of llvm-mc
core, see https://llvm.org/bugs/show_bug.cgi?id=27201.
Note that presence of useless symbols does not make ELF invalid.
[Review] http://ocltc.amd.com/reviews/r/11921/
Evgeny Mankov (OK)
[Tests]
Tested that issue with asm kernels has gone.
PASS TeamCity - Pre-checkin for CL1347161 timestamped:2016-11-29 21:54:40 Rev:0063
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/loaders/elf/elf.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.cpp#36 edit
SWDEV-94189 - HSA Finalizer: do not use temp files
New memfile interface is used to emulate files in memory inside perforce build.
Testing: smoke, precheckin, test_compiler, vp9 in chrome sandbox
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/_libelf_config.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/elf_begin.c#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.h#2 edit
SWDEV-94189 - ORCA RT: do not use temp files
This is memfile implementation, an interface to plug into libelf and emulate files in memory w/o any IO.
If passed filename to open() is empty it will use in memory file, otherwise proxy it to the real file IO routine.
This allows RT not to use temp files. Next this interface will be plugged to the finalizer.
Testing: smoke, precheckin, conformance 2.0 reallyquick, test_compiler 1.2 with -legacy, test_compiler with -save-temps-all and -g -O0 -mem2reg=0
Reviewed by Evgeny Mankov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf_utils.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/_libelf_config.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/build/Makefile.libelf#5 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/elf_update.c#12 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/memfile.h#1 add
SWDEV-83467 - [SPIRV] Add support of SPIRV to CPU
Modifying runtime and compile time to allow SPIRV binaries to run on CPU since it only runs on HSAIL GPU
Added changes to allow conversion of CPU's llvmBinaryIsSpir boolean into compiler library's oclElfSections enum
Cpuprogram.cpp's llvmBinaryIsSpir flag renamed to elfSectionType will now support LLVMIR, SPIR, and SPIRV
Added SPIRV to compiler lib's elf as new oclElfSections enum
cpuprogram.cpp changes also made to gpuprogram.cpp's NullProgram to allow compilation
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.cpp#33 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/elf.hpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/cpu/cpuprogram.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#191 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#266 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpucompiler.cpp#152 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#217 edit
SWDEV-77164 - Remove libelf differences from original elftoolchain. These erroneously make ELF_C_RDWR not to load existing section headers.
Testing: pre-checkin
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/elf/utils/libelf/elf_scn.c#4 edit