Kyle Roarty has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/47529 )

Change subject: gpu-compute: Update GET_PROCESS_APERTURES IOCTLs
......................................................................

gpu-compute: Update GET_PROCESS_APERTURES IOCTLs

The apertures for non-gfx801 GPUs are set differently.
If the apertures aren't set properly, ROCm will error out.

This updates the GPUVM apertures, as it is the one that
ROCm explicitly checks

(WIP)

Change-Id: I1fa6f60bc20c7b6eb3896057841d96846460a9f8
---
M src/gpu-compute/gpu_compute_driver.cc
1 file changed, 15 insertions(+), 14 deletions(-)



diff --git a/src/gpu-compute/gpu_compute_driver.cc b/src/gpu-compute/gpu_compute_driver.cc
index 02f1de5..7edbbdb 100644
--- a/src/gpu-compute/gpu_compute_driver.cc
+++ b/src/gpu-compute/gpu_compute_driver.cc
@@ -322,9 +322,15 @@
                 args->process_apertures[i].lds_limit =
                     ldsApeLimit(args->process_apertures[i].lds_base);

+            if (isdGPU) {
+                args->process_apertures[i].gpuvm_base = 0x1000000ull;
+                args->process_apertures[i].gpuvm_limit =
+                    0x0000800000000000ULL - 1;
+            } else {
args->process_apertures[i].gpuvm_base = gpuVmApeBase(i + 1);
                 args->process_apertures[i].gpuvm_limit =
                     gpuVmApeLimit(args->process_apertures[i].gpuvm_base);
+            }

                 // NOTE: Must match ID populated by hsaTopology.py
                 //
@@ -393,14 +399,6 @@
                        47) != 0x1ffff);
                 assert(bits<Addr>(args->process_apertures[i].lds_limit, 63,
                        47) != 0);
- assert(bits<Addr>(args->process_apertures[i].gpuvm_base, 63,
-                       47) != 0x1ffff);
- assert(bits<Addr>(args->process_apertures[i].gpuvm_base, 63,
-                       47) != 0);
- assert(bits<Addr>(args->process_apertures[i].gpuvm_limit, 63,
-                       47) != 0x1ffff);
- assert(bits<Addr>(args->process_apertures[i].gpuvm_limit, 63,
-                       47) != 0);
             }

             args.copyOut(virt_proxy);
@@ -595,8 +593,15 @@
                     scratchApeLimit(ape_args->scratch_base);
                 ape_args->lds_base = ldsApeBase(i + 1);
                 ape_args->lds_limit = ldsApeLimit(ape_args->lds_base);
-                ape_args->gpuvm_base = gpuVmApeBase(i + 1);
- ape_args->gpuvm_limit = gpuVmApeLimit(ape_args->gpuvm_base);
+                if (isdGPU) {
+                    ape_args->gpuvm_base = 0x1000000ull;
+                    ape_args->gpuvm_limit = 0x0000800000000000ULL - 1;
+                } else {
+                    ape_args->gpuvm_base = gpuVmApeBase(i + 1);
+                    ape_args->gpuvm_limit =
+                        gpuVmApeLimit(ape_args->gpuvm_base);
+                }
+

                 // NOTE: Must match ID populated by hsaTopology.py
                 if (isdGPU) {
@@ -628,10 +633,6 @@
                 assert(bits<Addr>(ape_args->lds_base, 63, 47) != 0);
                 assert(bits<Addr>(ape_args->lds_limit, 63, 47) != 0x1ffff);
                 assert(bits<Addr>(ape_args->lds_limit, 63, 47) != 0);
- assert(bits<Addr>(ape_args->gpuvm_base, 63, 47) != 0x1ffff);
-                assert(bits<Addr>(ape_args->gpuvm_base, 63, 47) != 0);
- assert(bits<Addr>(ape_args->gpuvm_limit, 63, 47) != 0x1ffff);
-                assert(bits<Addr>(ape_args->gpuvm_limit, 63, 47) != 0);

                 ape_args.copyOut(virt_proxy);
             }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47529
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: I1fa6f60bc20c7b6eb3896057841d96846460a9f8
Gerrit-Change-Number: 47529
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to