Matthew Poremba has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/57712 )
(
10 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
)Change subject: gpu-compute: Don't use emulated driver in full system
......................................................................
gpu-compute: Don't use emulated driver in full system
The emulated driver is currently called in a few locations
unconditionally. This changeset adds checks that we are not in full
system before calling any emulated driver function. In full system the
amdgpu driver running on the disk image handles these functions.
Change-Id: Iea3546b574e29c649351c0fce9154530be89e9b1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57712
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Maintainer: Matt Sinclair <mattdsincl...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/gpu-compute/compute_unit.cc
M src/gpu-compute/gpu_compute_driver.cc
2 files changed, 27 insertions(+), 3 deletions(-)
Approvals:
Matt Sinclair: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/gpu-compute/compute_unit.cc
b/src/gpu-compute/compute_unit.cc
index 6af45fe..eefb4d128 100644
--- a/src/gpu-compute/compute_unit.cc
+++ b/src/gpu-compute/compute_unit.cc
@@ -1051,13 +1051,18 @@
// only do some things if actually accessing data
bool isDataAccess = pkt->isWrite() || pkt->isRead();
- // For dGPUs, real hardware will extract MTYPE from the PTE. Our model
+ // For dGPUs, real hardware will extract MTYPE from the PTE. SE mode
// uses x86 pagetables which don't have fields to track GPU MTYPEs.
// Rather than hacking up the pagetable to add these bits in, we just
// keep a structure local to our GPUs that are populated in our
// emulated driver whenever memory is allocated. Consult that
structure
// here in case we need a memtype override.
- shader->gpuCmdProc.driver()->setMtype(pkt->req);
+ //
+ // In full system mode these can be extracted from the PTE and assigned
+ // after address translation takes place.
+ if (!FullSystem) {
+ shader->gpuCmdProc.driver()->setMtype(pkt->req);
+ }
// Check write before read for atomic operations
// since atomic operations should use BaseMMU::Write
@@ -1075,7 +1080,7 @@
PortID tlbPort_index = perLaneTLB ? index : 0;
if (shader->timingSim) {
- if (debugSegFault) {
+ if (!FullSystem && debugSegFault) {
Process *p = shader->gpuTc->getProcessPtr();
Addr vaddr = pkt->req->getVaddr();
unsigned size = pkt->getSize();
diff --git a/src/gpu-compute/gpu_compute_driver.cc
b/src/gpu-compute/gpu_compute_driver.cc
index ca870aa..203d087 100644
--- a/src/gpu-compute/gpu_compute_driver.cc
+++ b/src/gpu-compute/gpu_compute_driver.cc
@@ -1023,6 +1023,7 @@
{
// If we are a dGPU then set the MTYPE from our VMAs.
if (isdGPU) {
+ assert(!FullSystem);
AddrRange range = RangeSize(req->getVaddr(), req->getSize());
auto vma = gpuVmas.contains(range);
assert(vma != gpuVmas.end());
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57712
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iea3546b574e29c649351c0fce9154530be89e9b1
Gerrit-Change-Number: 57712
Gerrit-PatchSet: 22
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s