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

2023-04-24 Thread Matt Sinclair via gem5-dev
1.  I am not personally aware of any CPU-FPGA support, but maybe others on
this mailing list can chime in if they are aware of it.

2.  gem5 already has support for some small ML workloads.  For example
DNNMark (https://resources.gem5.org/resources/dnn-mark) is already
integrated into gem5-resources.  I know DeepBench works too, although my
group has not had time to integrate them into gem5-resources yet.  However,
larger workloads (e.g., ResNet, AlexNet) do not work yet.  We've spent a
lot of time getting things like that running in SE mode, but since the ROCm
versions keep changing, we decided to invest our time in getting GPU FS
mode support working first, so we didn't have to get new syscalls working
over and over. For example, in ROCm 1.6, I was able to get ResNet18 to run
into the 18th layer, but then there were a number of additional failures
that needed tending to, which we haven't gotten around to fixing.

Matt

On Sun, Apr 23, 2023 at 8:42 PM 429442672 <429442...@qq.com> wrote:

> Thank you so much, i will follow your guide to make some trials.
>
> By the way, i have a few more questions:
>
> 1. Does current Gem5 support simulating CPU-FPGA heterogeneous computing,
> if it is possible, could you please show me a way or url?
>
> 2. Is Gem5 able to simulate deep learning workload?
>
>
> -- 原始邮件 --
> *发件人:* "Matt Sinclair" ;
> *发送时间:* 2023年4月20日(星期四) 中午12:04
> *收件人:* "The gem5 Developer List";
> *抄送:* "gem5-users";"429442672"<429442...@qq.com>;
> *主题:* Re: [gem5-dev] Hi, i'm new to gem5. is there a way to make
> simulation for a CPU-GPU heterogeneous computing?
>
> 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-dev] [S] Change in gem5/gem5[develop]: base: Update include

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


Change subject: base: Update  include
..

base: Update  include

This change addresses an error in the compiler tests:
https://jenkins.gem5.org/job/compiler-checks/573/

For clang versions 6 through 10, as well as GCC 7,
in order to use the "filesystem" module, you must
include the experimental namespace.  In all newer
versions, you can use the "filesystem" module as is.

Because of this, include guards to handle this. They include
"" for the older clang versions and
the "" for all other versions.

As opposed to checking by version, we now check if the
filesystem library has been defined before using it.

Change-Id: I8fb8d4eaa33f3edc29b7626f44b82ee66ffe72be
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69778
Maintainer: Bobby Bruce 
Tested-by: kokoro 
Reviewed-by: Bobby Bruce 
---
M src/base/socket.cc
M src/mem/shared_memory_server.cc
2 files changed, 17 insertions(+), 10 deletions(-)

Approvals:
  Bobby Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/base/socket.cc b/src/base/socket.cc
index 62f2071..06fc286 100644
--- a/src/base/socket.cc
+++ b/src/base/socket.cc
@@ -40,13 +40,16 @@

 #include 

-#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__)
+// check if filesystem library is available
+#if defined(__cpp_lib_filesystem) || __has_include()
 #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 .
+// This is only reachable if we're using GCC 7 or clang versions 6
+// through 10 (note: gem5 does not support GCC versions older than
+// GCC 7 or clang versions older than clang 6.0 as they do not
+// support the C++17 standard).
+// If we're using GCC 7 or clang versions 6 through 10, we need to use
+// .
 #include 
 namespace std {
 namespace filesystem = experimental::filesystem;
diff --git a/src/mem/shared_memory_server.cc  
b/src/mem/shared_memory_server.cc

index f99655c..a4305d0 100644
--- a/src/mem/shared_memory_server.cc
+++ b/src/mem/shared_memory_server.cc
@@ -39,13 +39,17 @@
 #include 
 #include 
 #include 
-#if (defined(__GNUC__) && (__GNUC__ >= 8)) || defined(__clang__)
+
+// check if filesystem library is available
+#if defined(__cpp_lib_filesystem) || __has_include()
 #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 .
+// This is only reachable if we're using GCC 7 or clang versions 6
+// through 10 (note: gem5 does not support GCC versions older than
+// GCC 7 or clang versions older than clang 6.0 as they do not
+// support the C++17 standard).
+// If we're using GCC 7 or clang versions 6 through 10, we need to use
+// .
 #include 
 namespace std {
 namespace filesystem = experimental::filesystem;

--
To view, visit  
https://gem5-review.googlesource.com/c/public/gem5/+/69778?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: I8fb8d4eaa33f3edc29b7626f44b82ee66ffe72be
Gerrit-Change-Number: 69778
Gerrit-PatchSet: 4
Gerrit-Owner: Melissa Jost 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Melissa Jost 
Gerrit-Reviewer: kokoro 
___
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]: scons: Add stdc++fs and libc++experimental for clang LIBS env

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


Change subject: scons: Add stdc++fs and libc++experimental for clang LIBS  
env

..

scons: Add stdc++fs and libc++experimental for clang LIBS env

This change fixes a failure in the compiler tests:
https://jenkins.gem5.org/job/compiler-checks/573/

These tests were failing due to the use of `std::filesystem`, which
requires 'stdc++fs' to be linked for clang versions 6
through 10.

Change-Id: I4fa03923e8dc616046dead939c77d49b301de36b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69777
Reviewed-by: Bobby Bruce 
Maintainer: Bobby Bruce 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Bobby Bruce: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/SConstruct b/SConstruct
index 7e8f177..b784a04 100755
--- a/SConstruct
+++ b/SConstruct
@@ -512,6 +512,18 @@

 env.Append(TCMALLOC_CCFLAGS=['-fno-builtin'])

+if compareVersions(env['CXXVERSION'], "11") < 0:
+# `libstdc++fs`` must be explicitly linked for  
`std::filesystem``

+# in clang versions 6 through 10.
+#
+# In addition, for these versions, the
+# `std::filesystem` is under the `experimental`
+# namespace(`std::experimental::filesystem`).
+#
+# Note: gem5 does not support clang versions < 6.
+env.Append(LIBS=['stdc++fs'])
+
+
 # On Mac OS X/Darwin we need to also use libc++ (part of XCode) as
 # opposed to libstdc++, as the later is dated.
 if sys.platform == "darwin":

--
To view, visit  
https://gem5-review.googlesource.com/c/public/gem5/+/69777?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: I4fa03923e8dc616046dead939c77d49b301de36b
Gerrit-Change-Number: 69777
Gerrit-PatchSet: 3
Gerrit-Owner: Melissa Jost 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Melissa Jost 
Gerrit-Reviewer: kokoro 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org


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

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

Changes:


--
[...truncated 1.03 KB...]
 > git checkout -f c597361a6b9bb886d161e48b6f1605cc3903556e # timeout=10
Commit message: "dev-amdgpu: Add writeROM method"
 > git rev-list --no-walk c597361a6b9bb886d161e48b6f1605cc3903556e # timeout=10
[Checks API] No suitable checks publisher found.
[compiler-checks] $ /bin/sh -xe /tmp/jenkins3412542305142429.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 'ARM_MOESI_hammer.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MOESI_hammer.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_MESI_Three_Level.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level.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 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.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 'POWER.opt' with 'gcc-version-12'...
Done.
  * Building target 'POWER.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 'SPARC.opt' with 'gcc-version-12'...
Done.
  * Building target 'SPARC.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_HTM.opt' with 'gcc-version-12'...
Done.
  * Building target 'ARM_MESI_Three_Level_HTM.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 'Garnet_standalone.opt' with 'gcc-version-12'...
Done.
  * Building target 'Garnet_standalone.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 'GCN3_X86.opt' with 'gcc-version-12'...
Done.
  * Building target 'GCN3_X86.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 'NULL.opt' with 'gcc-version-12'...
Done.
  * Building target 'NULL.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 'ALL.opt' with 'gcc-version-12'...
Done.
  * Building target 'ALL.fast' with 'gcc-version-12'...
Done.
Starting build tests with 'gcc-version-11'...
  * Building target 'NULL.opt' with 'gcc-version-11'...
Done.
  * Building target 'NULL.fast' with 'gcc-version-11'...
Done.
Starting build tests with 'gcc-version-10'...
  * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_hammer.fast' with 'gcc-version-10'...
Done.
Starting build tests with 'gcc-version-9'...
  * Building target 'ARM_MOESI_hammer.opt' with 'gcc-version-9'...
Done.
  * Building target 'ARM_MOESI_hammer.fast' with 'gcc-version-9'...
Done.
Starting build tests with 'gcc-version-8'...
  * Building target 'NULL.opt' with 'gcc-version-8'...
Done.
  * Building target 'NULL.fast' with 'gcc-version-8'...
Done.
Starting build tests with 'gcc-version-7'...
  * Building target 'POWER.opt' with 'gcc-version-7'...
Done.
  * Building target 'POWER.fast' with 'gcc-version-7'...
Done.
Starting build tests with 'clang-version-14'...
'clang-version-14' was found in the comprehensive tests. All ISAs will be built.
  * Building target 'MIPS.opt' with 'clang-version-14'...
Done.
  * Building target 'MIPS.fast' with 'clang-version-14'...
Done.
  * Building target 'RISCV.opt' with 'clang-version-14'...
Done.
  * Building target 'RISCV.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 

[gem5-dev] [XS] Change in gem5/gem5[develop]: stdlib: write device tree after setting up bootloader in ARMBoard

2023-04-24 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/70017?usp=email )


 (

1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.
 )Change subject: stdlib: write device tree after setting up bootloader in  
ARMBoard

..

stdlib: write device tree after setting up bootloader in ARMBoard

The generation of the device tree in an arm system requires knowing
cpu-release-addr property, which is only available after setting up
the bootloader.

cpu-release-addr specifies where the secondary CPUs spin/sleep(?) before
being waken up by the kernel.

The incorrect cpu-release-addr causes booting an arm system using the
standard library with the arm's provided bootloader+linux_kernel to
fail to regconize more than 1 core.

Change-Id: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598
Signed-off-by: Hoa Nguyen 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/70017
Maintainer: Bobby Bruce 
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Richard Cooper 
---
M src/python/gem5/components/boards/arm_board.py
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  kokoro: Regressions pass
  Bobby Bruce: Looks good to me, approved
  Richard Cooper: Looks good to me, but someone else must approve




diff --git a/src/python/gem5/components/boards/arm_board.py  
b/src/python/gem5/components/boards/arm_board.py

index 10e2c0e..b439edf 100644
--- a/src/python/gem5/components/boards/arm_board.py
+++ b/src/python/gem5/components/boards/arm_board.py
@@ -320,10 +320,6 @@
 # The workload needs to know the dtb_file.
 self.workload.dtb_filename = self._get_dtb_filename()

-# Calling generateDtb from class ArmSystem to add memory  
information to

-# the dtb file.
-self.generateDtb(self._get_dtb_filename())
-
 # Finally we need to setup the bootloader for the ArmBoard. An ARM
 # system requires three inputs to simulate a full system: a disk  
image,

 # the kernel file and the bootloader file(s).
@@ -331,6 +327,10 @@
 self, self._get_dtb_filename(), self._bootloader
 )

+# Calling generateDtb from class ArmSystem to add memory  
information to

+# the dtb file.
+self.generateDtb(self._get_dtb_filename())
+
 def _get_dtb_filename(self) -> str:
 """Returns the dtb file location.


--
To view, visit  
https://gem5-review.googlesource.com/c/public/gem5/+/70017?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: Ice0e38492e2f77020b0e30c42dd4e8b7ee58e598
Gerrit-Change-Number: 70017
Gerrit-PatchSet: 3
Gerrit-Owner: Hoa Nguyen 
Gerrit-Reviewer: Bobby Bruce 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Kaustav Goswami 
Gerrit-Reviewer: Richard Cooper 
Gerrit-Reviewer: kokoro 
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org