SWDEV-198863 - Options for hip-clang-vdi path to provide the chicken bits, or functional equivalents to HCC_DB (phase 1)
1. The log macros is turned off for release build. So log functions has zero impact to release build.
2. The log macros have level, mask, condition control. So we can have more control to avoid log flooding.
I also adjusted some existing log to use new log functions.
1. To excercise and test the new log functions.
2. To improve performance slightly.
3. The change is mainly for HIP-ROCM, we can move more in next phases for PAL or ORCA.
4. I make these log feature unavailable for release build. We can revert to old log functions for release build in a case by case method.
Tests:
1. http://ocltc.amd.com:8111/viewModification.html?modId=128289&personal=true&tab=vcsModificationBuildshttp://ocltc.amd.com:8111/viewModification.html?modId=128358&personal=true&tab=vcsModificationBuilds
2. release build, run hip program, there is no log
3. fastdebug build, run hip program,
export LOG_LEVEL=3
export GPU_LOG_MASK=4294967295
There was a lot of logs.
4. fastdebug build, run hip program,
export LOG_LEVEL=2
export GPU_LOG_MASK=4294967295
There was no logs.
5. fastdebug build, run hip program,
export LOG_LEVEL=3
export GPU_LOG_MASK=4294967294
There was much less logs.
6. fastdebug build, run hip program,
export LOG_LEVEL=3
export GPU_LOG_MASK=47102
There was even much less logs. The logs was expected according to the mask.
7. Tested step 2 to 6 similarily in Windows and Linux
ReviewBoard: http://ocltc.amd.com/reviews/r/18215
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_internal.hpp#46 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_memory.cpp#82 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hiprtc_internal.hpp#2 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/comgrctx.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#29 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#68 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#137 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#91 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#100 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/runtime.cpp#40 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/debug.hpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#323 edit
SWDEV-204511 - [NV14 XTM] OpenCL Conformance Test Fails
- Handle different ABI versions for LC and HSAIL if single context with multiple devices was used. LC changed the locaiton of hidden arguments and HSAIL path requires patching
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#83 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.hpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#105 edit
SWDEV-184710 - Support hipLaunchCooperativeKernelMultiDevice()
- Add support for multi grid launch in hip
- Detect the new hidden argument and pass the required information for the kernel launch
- Memory for synchronization is allocated as a single object and then the offset for each GPU is found
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#343 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#82 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#136 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#42 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#90 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#99 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#97 edit
SWDEV-197026 - GpuToGpuCL_VS2015 test terminates upon launching
1. Since amd::buffer inherits from amd::memory, make sure that the methods it overwrites have the same signature as it's parent's.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/17769/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#138 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#111 edit
SWDEV-180872 - Runtime support changes for Cooperative Group Features
- Initial implementation of the core functionality. Disabled by default. Use GPU_ENABLE_COOP_GROUPS=1 to enable the feature.
- Runtime uses device queue for cooperative executions with a synchronization on the launched queue.
- The current implementation is pure runtime change and it can work if only one app uses this feature. No ROCr/KFD support was added or tested
- Only inline assembler was tested
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device_runtime.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.def.in#15 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_hcc.map.in#17 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#338 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#606 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#171 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#31 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#142 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#39 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palschedcl.cpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#135 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#61 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocblit.hpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#127 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#37 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocschedcl.cpp#3 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#75 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#94 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#92 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#311 edit
SWDEV-79445 - OCL generic changes and code clean-up
1. Add a flag to amd::memory::create() to force the allocation on all available devices.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/17466/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#137 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#110 edit
SWDEV-189140 - Add P2P support in PAL path
- PAL requires P2P resource open on the usage device. Add the new interface to open the resource
- Add a hidden P2P device object creation into amd::Memory. It can be activated with OCL context that has a single device.
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_p2p_amd.cpp#2 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#337 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#134 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#80 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#133 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#126 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#93 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.cpp#136 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/memory.hpp#109 edit
... //depot/stg/opencl/drivers/opencl/runtime/utils/flags.hpp#306 edit
SWDEV-162389 - Prepare the runtime code for enabling COMGR by default in the non-LC workspace
- Make sure OCL runtime can dynamically switch between HSAIL and LC paths
- For now use the both WITH_LIGHTNING_COMPILER and USE_COMGR_LIBRARY defines to identify LC specific code. The clean-up will come later
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/build/Makefile.api#179 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#238 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#327 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#249 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#118 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#74 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#85 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#63 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#101 edit
SWDEV-162389 - Prepare the runtime code for enabling COMGR by default in the non-LC workspace
- Make sure OCL runtime can dynamically switch between HSAIL and LC paths
- For now use the both WITH_LIGHTNING_COMPILER and USE_COMGR_LIBRARY defines to identify LC specific code. The clean-up will come later
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#236 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#325 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#12 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#8 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.hpp#10 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#247 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#116 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#72 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#83 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#61 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#99 edit
SWDEV-165045 - Linux-Pro System Hard-Hang with Call Trace and VM Faults are observed while running ABAQUS-2018-OpenCL Sample on VEGA GPU
"-g" option caused shader compiler generated isa code which caused the VM fault. The root cause is still unknown. "-g" is not a feature for end user. So remove it.
Remove -g options from application. The affected API includes build, link and compile CL C kernel code.
Update ocltst compiler test to remove one test which uses "-g"
AMD_OCL_BUILD_OPTIONS_APPEND can be used to force "-g" option
Test:
Run the Abaqus as specfied in the JIRA twice. No VM fault.
In a simple OpenCL test application, driver can handle build option "-g -cl-mad-enable -g -D DDBUILD -D ok-g -g" correctly.
Teamcity test.
http://ocltc.amd.com:8111/viewModification.html?modId=112334&personal=true&buildTypeId=&tab=vcsModificationBuilds&show_all_builds=true
No new failure.
ReviewBoard: http://ocltc.amd.com/reviews/r/16255/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#98 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/compiler/OCLSeparateCompile.cpp#17 edit
SWDEV-167970 - Ethereum mining (EthDcrMiner64.exe) App crashed while running Claymore Mining over VI,AI ,CI ASIC families
- Fix a regression after CL#1608975. Use amdil complib instance to query the binary options. The logic in the abstraction layer attempts to validate the binary options and for some reason Ethereum binary isn't compatible with the HSAIL complib instance. It's a workaround for now, since the app doesn't allow debugger and printf debugging is quite time consuming.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#322 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#169 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#97 edit
SWDEV-145570 - [HIP] Track last used event and use last enqueued command in a stream rather than creating a new event
ReviewBoardURL = http://ocltc.amd.com/reviews/r/15996/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#90 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#20 edit
SWDEV-150518 - [IQE][DG2018][I+eA][SSG] System hangs when trying to preview cache video to AMD SSG
- Disable optimization for "disabled deferred allocations" in SSG path. There is an extra logic to support double copy transfers with allocations in the invisible heap. It's not an official requirement for the SSG extension and hasn't been tested, but Adobe utilizes that path.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#89 edit