SWDEV-165756 - [ROCm] Backport cmake back into perforce to resolve cmake build broken issue
(Resubmitted CL1613181 with a bug fix)
- porting CMAKE changes in http://git.amd.com:8080/#/c/173995/
- add new source file names in runtime/CMakeLists.txt
-- required additional changes of CMAKE files from Konstantin to build the current OCL driver using CMAKE
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#34 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#34 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#13 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#15 edit
SWDEV-165756 - [ROCm] Backport cmake back into perforce to resolve cmake build broken issue
- porting CMAKE changes in http://git.amd.com:8080/#/c/173995/
- add new source file names in runtime/CMakeLists.txt
-- required additional changes of CMAKE files from Konstantin to build the current OCL driver using CMAKE
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/CMakeLists.txt#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/CMakeLists.txt#11 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/CMakeLists.txt#13 edit
SWDEV-143465 - HSAIL - Compiler Lib - Stop supporting SPIR binary on CI+ as well
This change plugs a hole when compiling from SPIR precompiled binary is possible on CI+ devices without option "-x spir" specified.
SPIR text has been already deprecated.
[Reviewers] Brian Sumner, Stanislav Mekhanoshin
[Testing] http://ocltc.amd.com:8111/viewModification.html?modId=107222&personal=true&tab=vcsModificationBuilds
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#101 edit
SWDEV-151981 - Removal of CPU support on Windows
- Part 1. Remove makefile options for CPU device support
http://ocltc.amd.com/reviews/r/14737/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#174 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/complibdefs#12 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/complibdefs#56 edit
... //depot/stg/opencl/drivers/opencl/library/Makefile#33 edit
... //depot/stg/opencl/drivers/opencl/opencldefs#226 edit
... //depot/stg/opencl/drivers/opencl/runtime/Makefile#27 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#217 edit
SWDEV-143465 - Stop building static C++ kernels on CI+
Changed legacy HSAIL/AMDIL stack logic:
1. Stop supporting AMDIL on CI+ devices: "AMDIL doesn't support device ..." will be reported.
2. Stop handling OpenCL extension options in RT: if "-x spir" or "-x clc++" option is specified, it wouldn't force legacy AMDIL compiler anymore.
3. Start reporting error on "-legacy" option in HSAIL compiler. If we reach HSAIL compiler, then it means that there are conflicting options. Report them all, possible options are: -frontend=edg, -cl-std=CL2.0 (>= 2.0), -binary_is_spirv.
Already submitted changes in stack logic:
1. Start reporting error for SI devices on HSAIL path.
2. Start handling OpenCL extension options on HSAIL path: report error on "-x spir" or "-x clc++" options.
[testing] http://ocltc.amd.com:8111/viewModification.html?modId=99901&personal=true&tab=vcsModificationBuilds
[reviewed] by Stas and German: http://ocltc.amd.com/reviews/r/14270
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/v0_8/if_acl.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#99 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#586 edit
SWDEV-132899 - [gfx10][OCL]- Adding support for forcing WaveSize32 from runtime for testing on gfx10 HW emulator
Motivation: During testing ocltst on Windows on PAL/HSAIL/SC path on gfx10 HW emulator, it was found that SC uses WaveSize64 by default for compute kernels.
SC also has an interface that can be used for forcing the WaveSize to 32 or 64.
- Adding the "-force-wave-size-32" into compiler to be passed down to Finalizer/SC
- Adding environment variable "GPU_FORCE_WAVE_SIZE_32" that can be used from runtime to force WaveSize32 compilation in HSAIL/SC path
ReviewBoardURL = http://ocltc.amd.com/reviews/r/14364/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/hsail_be.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#138 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#284 edit
SWDEV-143465 - AMDIL - Compiler Lib - Mark as unsupported all CI+ targets
1. Mark all CI+ targets as unsupported for AMDIL target mappings.
2. Let aclGetTargetInfo, aclGetTargetInfoFromChipID, aclGetDeviceInfo to report unsupported chips.
3. Fix aclReadFromMem in order to early determination of the target of binary in memory and reporting ACL_INVALID_TARGET if target is invalid, or ACL_UNSUPPORTED if chip is unsupported.
4. Add utility inline functions IsValidTarget, IsChipSupported, make getTargetMapping inline too, as it is used in the first two.
5. Fix affected tests.
[Testing] http://ocltc.amd.com:8111/viewModification.html?modId=98724&personal=true&init=1&tab=vcsModificationBuilds (clean)
[Reviewed] by Stas (http://ocltc.amd.com/reviews/r/14277)
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/api/v0_8/acl.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/libUtils.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/libUtils.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil64.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#49 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#45 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIF2xTo3x.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFBase.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFSymbol.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/aclAPI.cpp#22 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-143465 - Revert of #1516121
[Reason]
A plenty of tests are failed.
After the changing stack logic a lot of tests should be fixed, a lot - to be removed from testing.
#1516121 will be submitted again after renewal/removal of all the failed tests.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/v0_8/if_acl.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#98 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#583 edit
SWDEV-143465 - Stop building static C++ kernels on CI+
Changed stack logic:
1. Stop supporting AMDIL on CI+ devices: "AMDIL doesn't support device ..." will be reported.
2. Stop handling OpenCL extension options in RT: if "-x spir" or "-x clc++" option is specified, it wouldn't force legacy AMDIL compiler anymore.
3. Start reporting error on "-legacy" option in HSAIL compiler. If we reach HSAIL compiler, then it means that there are conflicting options. Report them all, possible options are: -frontend=edg, -cl-std=CL2.0 (>= 2.0), -binary_is_spirv.
Already submitted changes in stack logic:
1. Start reporting error for SI devices on HSAIL path.
2. Start handling OpenCL extension options on HSAIL path: report error on "-x spir" or "-x clc++" options.
[Testing]
rga offline for all the targets supported by HSAIL and AMDIL (from Family_SI up to Family_VI):
tahiti, pitcairn, capeverde, spectre, spooky, kalindi, hawaii, oland, bonaire, hainan, carrizo, iceland, tonga, fiji, stoney, baffin, ellesmere.
[Reviewed] by German and Stas (http://ocltc.amd.com/reviews/r/14270)
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/backends/common/v0_8/if_acl.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#97 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#582 edit
SWDEV-143465 - Fix crashes while mixed work with hsail and amdil (legacy) paths
Redirect (where it is possible) ACL API calls from HSAIL lib to legacy AMDIL lib if target is AMDIL.
For those functions (aclCreateFromBinary, aclReadFromMem), where redirect is impossible, explicit loadLibrary for AMDIL lib and call of corresponding function from AMDIL lib is performed.
[Reviewed] by Stas (http://ocltc.amd.com/reviews/r/14238)
[Testing] rga offline for all the targets supported by HSAIL and AMDIL (from Family_SI up to Family_VI):
tahiti, pitcairn, capeverde, spectre, spooky, kalindi, hawaii, oland, bonaire, hainan, carrizo, iceland, tonga, fiji, stoney, baffin, ellesmere.
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclValidation.cpp#8 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/aclValidation.h#3 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#29 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.h#30 edit
SWDEV-143465 - HSAIL - Add checks for OpenCL extension and device family
FAMILY_SI devices and OpenCL extensions clc++ and spir are not supported by HSAIL.
Affected only offline compilation via ACL API.
[Reviewed] by Stas, http://ocltc.amd.com/reviews/r/14240
[Testing] aoc2, rga
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#96 edit
SWDEV-127386 - Revert to HSAIL instead of LC
- Make it possible to override the path to components used by OpenCL by using variables.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#159 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/complibdefs#9 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/complibdefs#52 edit
... //depot/stg/opencl/drivers/opencl/opencldefs#209 edit
... //depot/stg/opencl/drivers/opencl/runtime/build/Makefile.runtime#69 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/build/Makefile.oclrocm#18 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-116690 - disable passing of -cl-fast-relaxed-math on ORCA path only
This is the w/a for bogus accurancy expectations of flopscl.
Testing: flopscl, precheckin
Reviewed by Brian Sumner and Evgeny Mankov
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/options.cpp#40 edit
SWDEV-109533 - AMDIL: increase inline cost threshold from 400 to 14000
This is the w/a to allow Blender work on SI device.
Testing: precheckin
Reviewed by Boleslaw Ciesielski
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/OPTIONS.def#6 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/OPTIONS.def#135 edit
SWDEV-107271 - [OpenCL][GFXIP9 Bring up] add support for Raven(gfx901)
- Add case for gfx901 else target device is incorrect for finalizer
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#23 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