gpu_compute: Support loading BLIT kernels
The BLIT kernels used to implement DMA through the shaders don't fill out all of the standard fields in an amd_kernel_code_t object. This patch modifies the code object parsing logic to support these new kernels. BLIT kernels are used in APUs when using ROCm memcopies for certain size buffers, and are used for dGPUs when the SDMA engines are disabled. Change-Id: Id4e667474d05e311097dbec443def07dfad14a79 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29959 Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
This commit is contained in:
committed by
Anthony Gutierrez
parent
72e9324ef0
commit
1d816250f8
@@ -100,11 +100,25 @@ GPUCommandProcessor::submitDispatchPkt(void *raw_pkt, uint32_t queue_id,
|
||||
machine_code_addr);
|
||||
|
||||
Addr kern_name_addr(0);
|
||||
virt_proxy.readBlob(akc.runtime_loader_kernel_symbol + 0x10,
|
||||
(uint8_t*)&kern_name_addr, 0x8);
|
||||
|
||||
std::string kernel_name;
|
||||
virt_proxy.readString(kernel_name, kern_name_addr);
|
||||
|
||||
/**
|
||||
* BLIT kernels don't have symbol names. BLIT kernels are built-in compute
|
||||
* kernels issued by ROCm to handle DMAs for dGPUs when the SDMA
|
||||
* hardware engines are unavailable or explicitly disabled. They can also
|
||||
* be used to do copies that ROCm things would be better performed
|
||||
* by the shader than the SDMA engines. They are also sometimes used on
|
||||
* APUs to implement asynchronous memcopy operations from 2 pointers in
|
||||
* host memory. I have no idea what BLIT stands for.
|
||||
* */
|
||||
if (akc.runtime_loader_kernel_symbol) {
|
||||
virt_proxy.readBlob(akc.runtime_loader_kernel_symbol + 0x10,
|
||||
(uint8_t*)&kern_name_addr, 0x8);
|
||||
|
||||
virt_proxy.readString(kernel_name, kern_name_addr);
|
||||
} else {
|
||||
kernel_name = "Blit kernel";
|
||||
}
|
||||
|
||||
DPRINTF(GPUKernelInfo, "Kernel name: %s\n", kernel_name.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user