[gem5-dev] Re: Hi, i'm new to gem5. is there a way to make simulation for a CPU-GPU heterogeneous computing?

2023-04-19 Thread Matt Sinclair via gem5-dev
Yes, all of the “GPU” examples posted on gem5-resources do this, for both
GCN3 and Vega models.  For example, I usually recommend people start with
square: https://resources.gem5.org/resources/square



You can find many more examples of this on the homepage of gem5 resources
too: https://resources.gem5.org/



Hope this helps,

Matt

On Wed, Apr 19, 2023 at 10:58 PM 429442672 via gem5-dev 
wrote:

> i'm new to gem5. May i ask is there a way to make simulation for a CPU-GPU
> heterogeneous computing? the gem5-gpu is too old and poorly maintained, so
> it is better to use GCN3, in ES mode.
>
>
> For example, i want to simulate that:
>
> 1.CPU load several data from CPU memory and handle them.
>
> 2.CPU send them to GPU memory
>
> 3.GPU fetch data from GPU memory and handle them.
>
> 4.GPU write the data back to CPU memory
>
>
> Is there a way to achieve this in Gem5?
>
> Sincerely ask for help.
>
> I find no example about CPU-GPU heterogeneous computing. Is there any
> example here?
> ___
> gem5-dev mailing list -- gem5-dev@gem5.org
> To unsubscribe send an email to gem5-dev-le...@gem5.org
>
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-users] Re: Hi, i'm new to gem5. is there a way to make simulation for a CPU-GPU heterogeneous computing?

2023-04-19 Thread Matt Sinclair via gem5-users
Yes, all of the “GPU” examples posted on gem5-resources do this, for both GCN3 
and Vega models.  For example, I usually recommend people start with square: 
https://resources.gem5.org/resources/square

You can find many more examples of this on the homepage of gem5 resources too: 
https://resources.gem5.org/

Hope this helps,
Matt

From: 429442672 via gem5-users 
Sent: Wednesday, April 19, 2023 10:59 PM
To: gem5-dev ; gem5-users 
Cc: 429442672 <429442...@qq.com>
Subject: [gem5-users] Hi, i'm new to gem5. is there a way to make simulation 
for a CPU-GPU heterogeneous computing?

i'm new to gem5. May i ask is there a way to make simulation for a CPU-GPU 
heterogeneous computing? the gem5-gpu is too old and poorly maintained, so it 
is better to use GCN3, in ES mode.



For example, i want to simulate that:

1.CPU load several data from CPU memory and handle them.

2.CPU send them to GPU memory

3.GPU fetch data from GPU memory and handle them.

4.GPU write the data back to CPU memory



Is there a way to achieve this in Gem5?

Sincerely ask for help.

I find no example about CPU-GPU heterogeneous computing. Is there any example 
here?
___
gem5-users mailing list -- gem5-us...@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-dev] Hi, i'm new to gem5. is there a way to make simulation for a CPU-GPU heterogeneous computing??

2023-04-19 Thread 429442672 via gem5-dev
i'm new to gem5. May i ask is there a way to make simulation for a CPU-GPU 
heterogeneous computing?? the gem5-gpu is too old and poorly maintained, so it 
is better to use GCN3, in ES mode.






For example, i want to simulate that: 

1.CPU load several data from CPU memory and handle them. 

2.CPU send them to GPU memory 

3.GPU fetch data from GPU memory and handle them. 

4.GPU write the data back to CPU memory




Is there a way to achieve this in Gem5?

Sincerely ask for help.

I find no example about CPU-GPU heterogeneous computing. Is there any example 
here?___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] [S] Change in gem5/gem5[develop]: base: Use include for GCC v7

2023-04-19 Thread Melissa Jost (Gerrit) via gem5-dev
Melissa Jost has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/69840?usp=email )


Change subject: base: Use  include for GCC v7
..

base: Use  include for GCC v7

This change adds include guards to the inclusion of the
filesystem module to ensure GCC 7 can work properly,
addressing an issue in the compiler tests.

Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69840
Maintainer: Jason Lowe-Power 
Reviewed-by: Richard Cooper 
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
---
M src/mem/shared_memory_server.cc
1 file changed, 12 insertions(+), 1 deletion(-)

Approvals:
  kokoro: Regressions pass
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Richard Cooper: Looks good to me, approved




diff --git a/src/mem/shared_memory_server.cc  
b/src/mem/shared_memory_server.cc

index 3e49164..f99655c 100644
--- a/src/mem/shared_memory_server.cc
+++ b/src/mem/shared_memory_server.cc
@@ -39,7 +39,18 @@
 #include 
 #include 
 #include 
-#include 
+#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__)
+#include 
+#else
+// This is only reachable if we're using GCC 7 (note: gem5 does not  
support

+// GCC versions older than GCC 7 as they do not support the C++17
+// standard).
+// If we're using GCC 7, we need to use .
+#include 
+namespace std {
+namespace filesystem = experimental::filesystem;
+}
+#endif

 #include "base/logging.hh"
 #include "base/output.hh"

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


Gerrit-MessageType: merged
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I642f79bd801baf4766572368b9339e34be46d1c3
Gerrit-Change-Number: 69840
Gerrit-PatchSet: 2
Gerrit-Owner: Melissa Jost 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Melissa Jost 
Gerrit-Reviewer: Richard Cooper 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Giacomo Travaglini 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-dev] [S] Change in gem5/gem5[develop]: mem: Handle DRAM write queue drain and disabled power down

2023-04-19 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/69917?usp=email )



Change subject: mem: Handle DRAM write queue drain and disabled power down
..

mem: Handle DRAM write queue drain and disabled power down

Write queue drain logic seems off currently. An event is scheduled if
the write queue is empty instead of non-empty. There is no check to see
if draining is complete when bus is in write mode. Finally the power
down check on drain always fails if DRAM powerdown is disabled.

This changeset reverses the drain conditional for the write queue to
schedule an event if the write queue is *not* empty and checks in the
event processing method that the queues are all empty so that
signalDrainDone can be called. Lastly the powerdown state is ignored if
DRAM powerdown is disabled. Powerdown is disabled in the GPU_VIPER
protocol by default. This changeset successfully drains and checkpoints
a GPUFS simulation using GPU_VIPER protocol.

Change-Id: I5459856a694c9054b28677049a06b99b9ad91bbb
---
M src/mem/dram_interface.hh
M src/mem/mem_ctrl.cc
2 files changed, 14 insertions(+), 2 deletions(-)



diff --git a/src/mem/dram_interface.hh b/src/mem/dram_interface.hh
index fa9d319..206f8e8 100644
--- a/src/mem/dram_interface.hh
+++ b/src/mem/dram_interface.hh
@@ -380,7 +380,11 @@
  * @param Return true if the rank is idle from a bank
  *and power point of view
  */
-bool inPwrIdleState() const { return pwrState == PWR_IDLE; }
+bool
+inPwrIdleState() const
+{
+return !dram.enableDRAMPowerdown || pwrState == PWR_IDLE;
+}

 /**
  * Trigger a self-refresh exit if there are entries enqueued
diff --git a/src/mem/mem_ctrl.cc b/src/mem/mem_ctrl.cc
index 543d637..074a31f 100644
--- a/src/mem/mem_ctrl.cc
+++ b/src/mem/mem_ctrl.cc
@@ -908,6 +908,13 @@
 }
 }

+if (drainState() == DrainState::Draining && !totalWriteQueueSize &&
+!totalReadQueueSize && respQEmpty()) {
+
+DPRINTF(Drain, "MemCtrl controller done draining\n");
+signalDrainDone();
+}
+
 // updates current state
 busState = busStateNext;

@@ -1420,7 +1427,8 @@

 // the only queue that is not drained automatically over time
 // is the write queue, thus kick things into action if needed
-if (!totalWriteQueueSize && !nextReqEvent.scheduled()) {
+if (totalWriteQueueSize && !nextReqEvent.scheduled()) {
+DPRINTF(Drain,"Scheduling nextReqEvent from drain\n");
 schedule(nextReqEvent, curTick());
 }


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


Gerrit-MessageType: newchange
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5459856a694c9054b28677049a06b99b9ad91bbb
Gerrit-Change-Number: 69917
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


[gem5-users] Re: [gem5-dev] Problem running gem5 gui

2023-04-19 Thread Jason Lowe-Power via gem5-users
Hi Nick,

Unfortunately, we haven't been able to keep the gem5 gui up to date with
either gem5 or python. I'm afraid that the code has undergone a lot of
bitrot over the past couple of years.

If it's any help, I can point you to what I use in my grad classes:
https://jlpteaching.github.io/comparch/modules/gem5/index/

Cheers,
Jason

On Wed, Apr 19, 2023 at 11:52 AM Beser, Nicholas D. via gem5-dev <
gem5-dev@gem5.org> wrote:

> I am creating a module for a graduate class that I teach at the Johns
> Hopkins University that covers gem5 and gem5 GUI. The gem5 code seems to
> work as expected. When I installed the GUI code, the installation seemed to
> complete without errors.  I can see that I have python 3.7.18 and pyside
> 5.13.2 with shiboken2 (version 5.13.2). However when I try to run the gui
> against the gem5.opt that I built (successfully and ran a script against).
> I get the following:
>
>
>
> ~/gem5/build/X86/gem5.opt gui.py
>
> gem5 Simulator System.  https://www.gem5.org
>
> gem5 is copyrighted software; use the --copyright option for details.
>
>
>
> gem5 version 22.1.0.0
>
> gem5 compiled Apr 18 2023 20:48:40
>
> gem5 started Apr 19 2023 12:55:02
>
> gem5 executing on besernd1-vm5, pid 823044
>
> command line: /home/besernd1/gem5/build/X86/gem5.opt gui.py
>
>
>
> TypeError: 'Shiboken.ObjectType' object is not iterable
>
>
>
> I researched the error, and it suggested that the version of python or the
> version of pyside2 was out of sync. (The web reference was not for a gem5
> error). I could use some advice to get around this error.
>
>
>
> Thank-you,
>
> Nick Beser
> ___
> gem5-dev mailing list -- gem5-dev@gem5.org
> To unsubscribe send an email to gem5-dev-le...@gem5.org
>
___
gem5-users mailing list -- gem5-us...@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org


[gem5-dev] Build failed in Jenkins: compiler-checks #580

2023-04-19 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:


--
[...truncated 1.03 KB...]
 > git checkout -f 09023d4158703a33f483593ffa76001a805d015b # timeout=10
Commit message: "mem-ruby: Not flushing data to memory when there's no dirty 
block"
 > git rev-list --no-walk 09023d4158703a33f483593ffa76001a805d015b # timeout=10
[Checks API] No suitable checks publisher found.
[compiler-checks] $ /bin/sh -xe /tmp/jenkins17545004409026041872.sh
+ ./tests/compiler-tests.sh -j 16
Starting build tests with 'gcc-version-12'...
'gcc-version-12' was found in the comprehensive tests. All ISAs will be built.
  * Building target 'GCN3_X86.opt' with 'gcc-version-12'...
Done.
  * Building target 'GCN3_X86.fast' with 'gcc-version-12'...
Done.
  * Building target 'NULL.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL.fast' with 'gcc-version-12'...
Done.
  * Building target 'RISCV.opt' with 'gcc-version-12'...
Done.
  * Building target 'RISCV.fast' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level.fast' with 'gcc-version-12'...
Done.
  * Building target 'POWER.opt' with 'gcc-version-12'...
Done.
  * Building target 'POWER.fast' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.fast' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MESI_Two_Level.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MESI_Two_Level.fast' with 'gcc-version-12'...
Done.
  * Building target 'X86_MOESI_AMD_Base.opt' with 'gcc-version-12'...
Done.
  * Building target 'X86_MOESI_AMD_Base.fast' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.fast' with 'gcc-version-12'...
Done.
  * Building target 'Garnet_standalone.opt' with 'gcc-version-12'...
Done.
  * Building target 'Garnet_standalone.fast' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MOESI_hammer.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MOESI_hammer.fast' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_CMP_token.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_CMP_token.fast' with 'gcc-version-12'...
Done.
  * Building target 'MIPS.opt' with 'gcc-version-12'...
Done.
  * Building target 'MIPS.fast' with 'gcc-version-12'...
Done.
  * Building target 'X86_MI_example.opt' with 'gcc-version-12'...
Done.
  * Building target 'X86_MI_example.fast' with 'gcc-version-12'...
Done.
  * Building target 'X86.opt' with 'gcc-version-12'...
Done.
  * Building target 'X86.fast' with 'gcc-version-12'...
Done.
  * Building target 'ARM.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM.fast' with 'gcc-version-12'...
Done.
  * Building target 'ALL.opt' with 'gcc-version-12'...
Done.
  * Building target 'ALL.fast' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_hammer.fast' with 'gcc-version-12'...
Done.
  * Building target 'SPARC.opt' with 'gcc-version-12'...
Done.
  * Building target 'SPARC.fast' with 'gcc-version-12'...
Done.
Starting build tests with 'gcc-version-11'...
  * Building target 'X86.opt' with 'gcc-version-11'...
Done.
  * Building target 'X86.fast' with 'gcc-version-11'...
Done.
Starting build tests with 'gcc-version-10'...
  * Building target 'GCN3_X86.opt' with 'gcc-version-10'...
Done.
  * Building target 'GCN3_X86.fast' with 'gcc-version-10'...
Done.
Starting build tests with 'gcc-version-9'...
  * Building target 'X86.opt' with 'gcc-version-9'...
Done.
  * Building target 'X86.fast' with 'gcc-version-9'...
Done.
Starting build tests with 'gcc-version-8'...
  * Building target 'NULL_MESI_Two_Level.opt' with 'gcc-version-8'...
Done.
  * Building target 'NULL_MESI_Two_Level.fast' with 'gcc-version-8'...
Done.
Starting build tests with 'gcc-version-7'...
  * Building target 'ARM_MESI_Three_Level_HTM.opt' with 'gcc-version-7'...
  ! Failed with exit code 2.
  * Building target 'ARM_MESI_Three_Level_HTM.fast' with 'gcc-version-7'...
  ! Failed with exit code 2.
Starting build tests with 'clang-version-14'...
'clang-version-14' was found in the comprehensive tests. All ISAs will be built.
  * Building target 'X86.opt' with 'clang-version-14'...
Done.
  * Building target 'X86.fast' with 'clang-version-14'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.opt' with 'clang-version-14'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.fast' with 'clang-version-14'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.opt' with 

[gem5-dev] Problem running gem5 gui

2023-04-19 Thread Beser, Nicholas D. via gem5-dev
I am creating a module for a graduate class that I teach at the Johns Hopkins 
University that covers gem5 and gem5 GUI. The gem5 code seems to work as 
expected. When I installed the GUI code, the installation seemed to complete 
without errors.  I can see that I have python 3.7.18 and pyside 5.13.2 with 
shiboken2 (version 5.13.2). However when I try to run the gui against the 
gem5.opt that I built (successfully and ran a script against). I get the 
following:

~/gem5/build/X86/gem5.opt gui.py
gem5 Simulator System.  https://www.gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 22.1.0.0
gem5 compiled Apr 18 2023 20:48:40
gem5 started Apr 19 2023 12:55:02
gem5 executing on besernd1-vm5, pid 823044
command line: /home/besernd1/gem5/build/X86/gem5.opt gui.py

TypeError: 'Shiboken.ObjectType' object is not iterable

I researched the error, and it suggested that the version of python or the 
version of pyside2 was out of sync. (The web reference was not for a gem5 
error). I could use some advice to get around this error.

Thank-you,
Nick Beser
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org