gem5-dev@gem5.org

The gem5 Developer List

View all threads

[XS] Change in gem5/gem5[develop]: gpu-compute: Gfx version check for FS and SE mode

MP
Matthew Poremba (Gerrit)
Thu, Jun 1, 2023 12:15 AM

Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/71078?usp=email )

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

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

M src/gpu-compute/gpu_command_processor.cc
M src/gpu-compute/gpu_compute_driver.hh
2 files changed, 5 insertions(+), 1 deletion(-)

Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/src/gpu-compute/gpu_command_processor.cc
b/src/gpu-compute/gpu_command_processor.cc
index 9755180..8f748bd 100644
--- a/src/gpu-compute/gpu_command_processor.cc
+++ b/src/gpu-compute/gpu_command_processor.cc
@@ -227,9 +227,11 @@

  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 "
    

diff --git a/src/gpu-compute/gpu_compute_driver.hh
b/src/gpu-compute/gpu_compute_driver.hh
index def40f4..9a3c647 100644
--- a/src/gpu-compute/gpu_compute_driver.hh
+++ b/src/gpu-compute/gpu_compute_driver.hh
@@ -142,6 +142,8 @@
};
typedef class EventTableEntry ETEntry;

  • GfxVersion getGfxVersion() const { return gfxVersion; }
  • private:
    /**
    * GPU that is controlled by this driver.

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/71078?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I33fdafb60d351ebc5148e2248244537fb5bebd31
Gerrit-Change-Number: 71078
Gerrit-PatchSet: 2
Gerrit-Owner: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: Bobby Bruce bbruce@ucdavis.edu
Gerrit-Reviewer: Matt Sinclair mattdsinclair@gmail.com
Gerrit-Reviewer: Matthew Poremba matthew.poremba@amd.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com

Matthew Poremba has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/71078?usp=email ) Change subject: gpu-compute: Gfx version check for FS and SE mode ...................................................................... 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> --- M src/gpu-compute/gpu_command_processor.cc M src/gpu-compute/gpu_compute_driver.hh 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Matt Sinclair: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/src/gpu-compute/gpu_command_processor.cc b/src/gpu-compute/gpu_command_processor.cc index 9755180..8f748bd 100644 --- a/src/gpu-compute/gpu_command_processor.cc +++ b/src/gpu-compute/gpu_command_processor.cc @@ -227,9 +227,11 @@ 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 " diff --git a/src/gpu-compute/gpu_compute_driver.hh b/src/gpu-compute/gpu_compute_driver.hh index def40f4..9a3c647 100644 --- a/src/gpu-compute/gpu_compute_driver.hh +++ b/src/gpu-compute/gpu_compute_driver.hh @@ -142,6 +142,8 @@ }; typedef class EventTableEntry ETEntry; + GfxVersion getGfxVersion() const { return gfxVersion; } + private: /** * GPU that is controlled by this driver. -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/71078?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: I33fdafb60d351ebc5148e2248244537fb5bebd31 Gerrit-Change-Number: 71078 Gerrit-PatchSet: 2 Gerrit-Owner: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: Bobby Bruce <bbruce@ucdavis.edu> Gerrit-Reviewer: Matt Sinclair <mattdsinclair@gmail.com> Gerrit-Reviewer: Matthew Poremba <matthew.poremba@amd.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com>