SWDEV-204782 - introduce hostcall
Hostcall is a service that allows a kernel to submit requests to the
host using shared buffers, and block until a response is received. This
will eventually replace the shared buffer currently used for printf, and
repurposes the same hidden kernel argument.
When the runtime launches a kernel that requires the hostcall service it
performs the following actions:
- Launch a hostcall listener thread if it is not already running.
- Locate the hostcall buffer for the corresponding hardware queue, or
create a new one.
- Register the new hostcall buffer with the listener thread.
- Set the hostcall buffer pointer as an implicit argument to the kernel.
Affected files ...
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/Makefile#21 edit
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/build/Makefile.hip_tests#31 edit
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/scripts/hip_hostcall_tests.txt#1 add
... //depot/stg/opencl/drivers/opencl/make/hip.git/tests/scripts/run_all_tests.sh#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#19 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#143 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rochostcall.cpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rochostcall.hpp#1 add
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#92 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-165259 - Update OpenCL runtime to support MsgPack metadata
- Fixed a typo in the value type field of kernel metadata for V3
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#15 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-169078 - Also copy private_segment_size/group_segment_size to runtime handle.
The library need these info to setup child kernel's AQL for device enqueue.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devkernel.hpp#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#69 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#26 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#44 edit