gpu-compute: Gfx version check for FS and SE mode

There is no GPU device in SE mode to get version from and no GPU driver
in FS mode to get version from, so a conditional needs to be added
depending on the mode to get the gfx version.

Change-Id: I33fdafb60d351ebc5148e2248244537fb5bebd31
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/71078
Tested-by: kokoro <noreply+kokoro@google.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
This commit is contained in:
Matthew Poremba
2023-05-30 13:57:09 -05:00
parent bd1d72f61e
commit ebd5b3e4ae
2 changed files with 5 additions and 1 deletions

View File

@@ -227,9 +227,11 @@ GPUCommandProcessor::submitDispatchPkt(void *raw_pkt, uint32_t queue_id,
DPRINTF(GPUKernelInfo, "Kernel name: %s\n", kernel_name.c_str());
GfxVersion gfxVersion = FullSystem ? gpuDevice->getGfxVersion()
: driver()->getGfxVersion();
HSAQueueEntry *task = new HSAQueueEntry(kernel_name, queue_id,
dynamic_task_id, raw_pkt, &akc, host_pkt_addr, machine_code_addr,
gpuDevice->getGfxVersion());
gfxVersion);
DPRINTF(GPUCommandProc, "Task ID: %i Got AQL: wg size (%dx%dx%d), "
"grid size (%dx%dx%d) kernarg addr: %#x, completion "

View File

@@ -142,6 +142,8 @@ class GPUComputeDriver final : public EmulatedDriver
};
typedef class EventTableEntry ETEntry;
GfxVersion getGfxVersion() const { return gfxVersion; }
private:
/**
* GPU that is controlled by this driver.