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

2021-07-01 Thread jenkins-no-reply--- via gem5-dev
See 


Changes:

[shingarov] arch-power: Add trap instructions

[shingarov] arch-power: Fix move condition field instructions

[shingarov] arch-power: Add move condition field instructions

[shingarov] arch-power: Add time base instructions

[shingarov] arch-power: Refactor argument registers

[shingarov] base: Add byte order attribute for object files

[odanrc] mem-cache: Make WeightedLRU inherit from LRU

[odanrc] mem-cache: Use PacketPtr in tags's accessBlock

[odanrc] mem-cache: Allow sending packet information to replacement policy

[odanrc] mem-cache: Add Signature-Based Hit Predictor replacement policy

[matthew.poremba] arch-gcn3: Remove unused files

[odanrc] misc: Adopt the gem5 namespace

[odanrc] mem-garnet: Add a garnet namespace


--
Started by timer
Running as SYSTEM
Building in workspace 
Selected Git installation does not exist. Using Default
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir 
 >  # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://gem5.googlesource.com/public/gem5 # 
 > timeout=10
Fetching upstream changes from https://gem5.googlesource.com/public/gem5
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
 > git fetch --tags --force --progress -- 
 > https://gem5.googlesource.com/public/gem5 
 > +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
Checking out Revision 00cd307b138f0fe59f5e6c9e7a14d783e82b2eb4 
(refs/remotes/origin/develop)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 00cd307b138f0fe59f5e6c9e7a14d783e82b2eb4 # timeout=10
Commit message: "mem-garnet: Add a garnet namespace"
 > git rev-list --no-walk 84837422d87d5c805266b286321260c70cd84ad4 # timeout=10
[compiler-checks] $ /bin/sh -xe /tmp/jenkins7587504956767538575.sh
+ ./tests/compiler-tests.sh -j 12
Starting build tests with 'gcc-version-10'...
'gcc-version-10' was found in the comprehensive tests. All ISAs will be built.
  * Building target 'RISCV.opt' with 'gcc-version-10'...
Done.
  * Building target 'RISCV.fast' with 'gcc-version-10'...
Done.
  * Building target 'SPARC.opt' with 'gcc-version-10'...
Done.
  * Building target 'SPARC.fast' with 'gcc-version-10'...
Done.
  * Building target 'GCN3_X86.opt' with 'gcc-version-10'...
Done.
  * Building target 'GCN3_X86.fast' with 'gcc-version-10'...
Done.
  * Building target 'Garnet_standalone.opt' with 'gcc-version-10'...
Done.
  * Building target 'Garnet_standalone.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_hammer.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_hammer.fast' with 'gcc-version-10'...
Done.
  * Building target 'X86.opt' with 'gcc-version-10'...
Done.
  * Building target 'X86.fast' with 'gcc-version-10'...
Done.
  * Building target 'POWER.opt' with 'gcc-version-10'...
Done.
  * Building target 'POWER.fast' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MESI_Three_Level.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM_MESI_Three_Level.fast' with 'gcc-version-10'...
Done.
  * Building target 'MIPS.opt' with 'gcc-version-10'...
Done.
  * Building target 'MIPS.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MESI_Two_Level.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MESI_Two_Level.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.fast' with 'gcc-version-10'...
Done.
  * Building target 'X86_MOESI_AMD_Base.opt' with 'gcc-version-10'...
Done.
  * Building target 'X86_MOESI_AMD_Base.fast' with 'gcc-version-10'...
Done.
  * Building target 'ARM.opt' with 'gcc-version-10'...
Done.
  * Building target 'ARM.fast' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_token.opt' with 'gcc-version-10'...
Done.
  * Building target 'NULL_MOESI_CMP_token.fast' with 'gcc-version-10'...
Done.
Starting build tests with 'gcc-version-9'...
  * Building target 'NULL_MOESI_CMP_directory.opt' with 'gcc-version-9'...
Done.
  * Building target 'NULL_MOESI_CMP_directory.fast' with 'gcc-version-9'...
Done.
Starting build tests with 'gcc-version-8'...
  * Building target 'NULL_MOESI_CMP_token.opt' with 'gcc-version-8'...
Done.
  * Building target 'NULL_MOESI_CMP_token.fast' with 'gcc-version-8'...
Done.
Starting build tests with 'gcc-version-7'...
  * Building target 'ARM_MESI_Three_Level.opt' with 'gcc-version-7'...
Done.
  * Building target 'ARM_MESI_Three_Level.fast' with 'gcc-version-7'...
Done.
Starting 

[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Add fatal when decoding missing insts

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47522 )



Change subject: arch-vega: Add fatal when decoding missing insts
..

arch-vega: Add fatal when decoding missing insts

Certain instructions don't have implementations in instructions.cc,
and get decoded as a nullptr.

This adds a fatal when decoding a missing instruction, as we aren't
able to properly run a program if all its instructions aren't
implemented, and it allows us to figure out which instruction i
missing due to fatals printing the line they were called.

Change-Id: I7e3690f079b790dceee102063773d5fbbc8619f1
---
M src/arch/amdgpu/vega/decoder.cc
1 file changed, 229 insertions(+), 0 deletions(-)



diff --git a/src/arch/amdgpu/vega/decoder.cc  
b/src/arch/amdgpu/vega/decoder.cc

index 480d326..94035f6 100644
--- a/src/arch/amdgpu/vega/decoder.cc
+++ b/src/arch/amdgpu/vega/decoder.cc
@@ -4437,6 +4437,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_MUL_HI_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4449,42 +4450,49 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL1_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL2_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL3_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_LSHL4_ADD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LL_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_PACK_LH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_HH_B32_B16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -4611,6 +4619,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOPK__S_CALL_B64(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

@@ -6831,108 +6840,126 @@
 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_U32_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_I32_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_XAD_U32(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MIN3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAX3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_F16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_I16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MED3_U16(MachInst iFmt)
 {
+fatal("Trying to decode instruction without a class\n");
 return nullptr;
 }

 GPUStaticInst*
 

[gem5-dev] Change in gem5/gem5[develop]: arch-x86: Ignore mbind syscall

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47526 )



Change subject: arch-x86: Ignore mbind syscall
..

arch-x86: Ignore mbind syscall

mbind gets called when running with a dGPU in ROCm 4,
but we are able to ignore it without breaking anything

Change-Id: I7c1ba47656122a5eb856981dca2a05359098e3b2
---
M src/arch/x86/linux/syscall_tbl64.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/arch/x86/linux/syscall_tbl64.cc  
b/src/arch/x86/linux/syscall_tbl64.cc

index 7231595..6f2fad5 100644
--- a/src/arch/x86/linux/syscall_tbl64.cc
+++ b/src/arch/x86/linux/syscall_tbl64.cc
@@ -281,7 +281,7 @@
 { 234, "tgkill", tgkillFunc },
 { 235, "utimes" },
 { 236, "vserver" },
-{ 237, "mbind" },
+{ 237, "mbind", ignoreFunc },
 { 238, "set_mempolicy" },
 { 239, "get_mempolicy", ignoreFunc },
 { 240, "mq_open" },

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47526
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: I7c1ba47656122a5eb856981dca2a05359098e3b2
Gerrit-Change-Number: 47526
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: gpu-compute: Add mmap functionality to GPURenderDriver

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47523 )



Change subject: gpu-compute: Add mmap functionality to GPURenderDriver
..

gpu-compute: Add mmap functionality to GPURenderDriver

dGPUs mmap the GPURenderDriver, however it doesn't appear that they do
anything with it. This patch implements the mmap function by just
returning the address provided, while not doing anything else

Change-Id: Ia010a2aebcf7e2c75e22d93dfb440937d1bef3b1
---
M src/gpu-compute/gpu_render_driver.cc
M src/gpu-compute/gpu_render_driver.hh
2 files changed, 13 insertions(+), 1 deletion(-)



diff --git a/src/gpu-compute/gpu_render_driver.cc  
b/src/gpu-compute/gpu_render_driver.cc

index 1af83cb..41730d2 100644
--- a/src/gpu-compute/gpu_render_driver.cc
+++ b/src/gpu-compute/gpu_render_driver.cc
@@ -38,7 +38,7 @@

 /* ROCm 4 utilizes the render driver located at /dev/dri/renderDXXX. This
  * patch implements a very simple driver that just returns a file
- * descriptor when opened, as testing has shown that's all that's needed
+ * descriptor when opened.
  */
 int
 GPURenderDriver::open(ThreadContext *tc, int mode, int flags)
@@ -48,3 +48,12 @@
 int tgt_fd = process->fds->allocFD(device_fd_entry);
 return tgt_fd;
 }
+
+/* DGPUs try to mmap the driver file. It doesn't appear they do anything
+ * with it, so we just return the address that's provided
+ */
+Addr GPURenderDriver::mmap(ThreadContext *tc, Addr start, uint64_t length,
+   int prot, int tgt_flags, int tgt_fd, off_t  
offset)

+{
+return start;
+}
diff --git a/src/gpu-compute/gpu_render_driver.hh  
b/src/gpu-compute/gpu_render_driver.hh

index d070668..a992976 100644
--- a/src/gpu-compute/gpu_render_driver.hh
+++ b/src/gpu-compute/gpu_render_driver.hh
@@ -47,6 +47,9 @@
 {
 return -EBADF;
 }
+
+Addr mmap(ThreadContext *tc, Addr start, uint64_t length,
+  int prot, int tgt_flags, int tgt_fd, off_t offset) override;
 };

 #endif

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47523
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: Ia010a2aebcf7e2c75e22d93dfb440937d1bef3b1
Gerrit-Change-Number: 47523
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs: Don't report CPU cores on Fiji properties

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47525 )



Change subject: configs: Don't report CPU cores on Fiji properties
..

configs: Don't report CPU cores on Fiji properties

ROCm determines if a device is a dGPU in two ways. The first
is by looking at the device ID. The second is through a flag that
gets set only if the reported cpu_cores_count is 0.

If these don't agree, ROCm breaks when doing memory operations.

Previously, cpu_cores_count was non-zero on the Fiji config.
This patch sets it to 0 to appease ROCm

Change-Id: I0fd0ce724f491ed6a4598188b3799468668585f4
---
M configs/example/hsaTopology.py
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/configs/example/hsaTopology.py b/configs/example/hsaTopology.py
index 78193e0..28060cc 100644
--- a/configs/example/hsaTopology.py
+++ b/configs/example/hsaTopology.py
@@ -359,7 +359,7 @@
 file_append((io_dir, 'properties'), io_prop)

 # Populate GPU node properties
-node_prop = 'cpu_cores_count %s\n' %  
options.num_cpus   + \
+node_prop = 'cpu_cores_count  
0\n'   + \
 'simd_count %s\n'  
\
 % (options.num_compute_units *  
options.simds_per_cu)+ \
 'mem_banks_count  
1\n'   + \


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47525
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: I0fd0ce724f491ed6a4598188b3799468668585f4
Gerrit-Change-Number: 47525
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs: Add shared_cpu_list to cache directories

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47524 )



Change subject: configs: Add shared_cpu_list to cache directories
..

configs: Add shared_cpu_list to cache directories

The ROCm thunk uses this file instead of the
shared_cpu_map file.

Change-Id: I985512245c9f51106b8347412ed643f78b567b24
---
M configs/common/FileSystemConfig.py
1 file changed, 2 insertions(+), 0 deletions(-)



diff --git a/configs/common/FileSystemConfig.py  
b/configs/common/FileSystemConfig.py

index 0d9f221..66a6315 100644
--- a/configs/common/FileSystemConfig.py
+++ b/configs/common/FileSystemConfig.py
@@ -217,6 +217,8 @@
 file_append((indexdir, 'number_of_sets'), num_sets)
 file_append((indexdir, 'physical_line_partition'), '1')
 file_append((indexdir, 'shared_cpu_map'), hex_mask(cpus))
+file_append((indexdir, 'shared_cpu_list'),
+','.join(str(cpu) for cpu in cpus))

 def _redirect_paths(options):
 # Redirect filesystem syscalls from src to the first matching dests

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47524
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: I985512245c9f51106b8347412ed643f78b567b24
Gerrit-Change-Number: 47524
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: gpu-compute: Update GET_PROCESS_APERTURES IOCTLs

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
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 = 0x100ull;
+args->process_apertures[i].gpuvm_limit =
+0x8000ULL - 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) != 0x1);
 assert(bits(args->process_apertures[i].lds_limit, 63,
47) != 0);
-assert(bits(args->process_apertures[i].gpuvm_base,  
63,

-   47) != 0x1);
-assert(bits(args->process_apertures[i].gpuvm_base,  
63,

-   47) != 0);
-assert(bits(args->process_apertures[i].gpuvm_limit,  
63,

-   47) != 0x1);
-assert(bits(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 = 0x100ull;
+ape_args->gpuvm_limit = 0x8000ULL - 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(ape_args->lds_base, 63, 47) != 0);
 assert(bits(ape_args->lds_limit, 63, 47) != 0x1);
 assert(bits(ape_args->lds_limit, 63, 47) != 0);
-assert(bits(ape_args->gpuvm_base, 63, 47) !=  
0x1);

-assert(bits(ape_args->gpuvm_base, 63, 47) != 0);
-assert(bits(ape_args->gpuvm_limit, 63, 47) !=  
0x1);

-assert(bits(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 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs,gpu-compute: Add support for gfx902/Raven

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47530 )



Change subject: configs,gpu-compute: Add support for gfx902/Raven
..

configs,gpu-compute: Add support for gfx902/Raven

This patch adds support for a gfx902 Vega APU, ripping the
appropriate values for device_id from the ROCm Thunk
(src/topology.c)

Note: gfx902 isn't officially supported by ROCm. This
means that it may not work for all programs. In particular,
rocBLAS is incompatible with gfx902, so anything that uses
rocBLAS won't be able to run with gfx902

Change-Id: I48893e7cc9c7e52275fdfd22314f371a9db8e90a
---
M configs/example/apu_se.py
M configs/example/hsaTopology.py
M src/gpu-compute/GPU.py
M src/gpu-compute/gpu_compute_driver.cc
M src/gpu-compute/gpu_compute_driver.hh
5 files changed, 19 insertions(+), 7 deletions(-)



diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 8d49865..1e78f27 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -189,7 +189,7 @@
 "between 0-7")

 parser.add_argument("--gfx-version", type=str, default='gfx801',
-help="Gfx version for gpu: gfx801, gfx803, gfx900")
+help="Gfx version for gpu: gfx801, gfx803, gfx900,  
gfx902")


 Ruby.define_options(parser)

@@ -682,7 +682,7 @@
 elif args.gfx_version == 'gfx900':
 hsaTopology.createVegaTopology(args)
 else:
-assert (args.gfx_version in ['gfx801']),\
+assert (args.gfx_version in ['gfx801', 'gfx902']),\
 "Incorrect gfx version for APU"
 hsaTopology.createCarrizoTopology(args)

diff --git a/configs/example/hsaTopology.py b/configs/example/hsaTopology.py
index da3bc57..7996a83 100644
--- a/configs/example/hsaTopology.py
+++ b/configs/example/hsaTopology.py
@@ -427,13 +427,21 @@
 file_append((node_dir, 'gpu_id'), 2765)

 # must have marketing name
-file_append((node_dir, 'name'), 'Carrizo\n')
+if options.gfx_version == 'gfx801':
+file_append((node_dir, 'name'), 'Carrizo\n')
+elif options.gfx_version == 'gfx902':
+file_append((node_dir, 'name'), 'Raven\n')

 mem_banks_cnt = 1

 # Should be the same as the render driver filename  
(dri/renderD)

 drm_num = 128

+if options.gfx_version == 'gfx801':
+device_id = 39028
+elif options.gfx_version == 'gfx902':
+device_id = 5597
+
 # populate global node properties
 # NOTE: SIMD count triggers a valid GPU agent creation
 node_prop = 'cpu_cores_count %s\n' %  
options.num_cpus   + \

@@ -454,7 +462,7 @@
 'simd_per_cu %s\n' %  
options.simds_per_cu   + \
 'max_slots_scratch_cu  
32\n' + \
 'vendor_id  
4098\n'  + \
-'device_id  
39028\n' + \
+'device_id %s\n' %  
device_id+ \
 'location_id  
8\n'   + \
 'drm_render_minor %s\n' %  
drm_num   + \
 'max_engine_clk_fcompute %s\n' 
\

diff --git a/src/gpu-compute/GPU.py b/src/gpu-compute/GPU.py
index 107899e..e07f180 100644
--- a/src/gpu-compute/GPU.py
+++ b/src/gpu-compute/GPU.py
@@ -52,6 +52,7 @@
 'gfx801',
 'gfx803',
 'gfx900',
+'gfx902',
 ]

 class PoolManager(SimObject):
diff --git a/src/gpu-compute/gpu_compute_driver.cc  
b/src/gpu-compute/gpu_compute_driver.cc

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

-if (isdGPU) {
+if (isdGPU || gfxVersion == GfxVersion::gfx902) {
 args->process_apertures[i].gpuvm_base = 0x100ull;
 args->process_apertures[i].gpuvm_limit =
 0x8000ULL - 1;
@@ -355,6 +355,7 @@
 } else {
 switch (gfxVersion) {
   case GfxVersion::gfx801:
+  case GfxVersion::gfx902:
 args->process_apertures[i].gpu_id = 2765;
 break;
   default:
@@ -593,7 +594,7 @@
 scratchApeLimit(ape_args->scratch_base);
 ape_args->lds_base = ldsApeBase(i + 1);
 ape_args->lds_limit = ldsApeLimit(ape_args->lds_base);
-if (isdGPU) {
+if (isdGPU || gfxVersion == GfxVersion::gfx902) {
 ape_args->gpuvm_base = 0x100ull;
 ape_args->gpuvm_limit = 0x8000ULL - 

[gem5-dev] Change in gem5/gem5[develop]: configs,gpu-compute: Set proper dGPUPoolID defaults

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47527 )



Change subject: configs,gpu-compute: Set proper dGPUPoolID defaults
..

configs,gpu-compute: Set proper dGPUPoolID defaults

In GPU.py, dGPUPoolID is defined as an int, but was defaulted
to False. Explicitly set it to 0, instead.

In apu_se.py, dGPUPoolID was being set to 1, but that was
resulting in crashes. Setting it to 0 avoids those crashes

Change-Id: I0f1161588279a335bbd0d8ae7acda97fc23201b5
---
M configs/example/apu_se.py
M src/gpu-compute/GPU.py
2 files changed, 2 insertions(+), 2 deletions(-)



diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 98a1e19..8d49865 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -434,7 +434,7 @@
 # HSA kernel mode driver
 gpu_driver = GPUComputeDriver(filename = "kfd", isdGPU = args.dgpu,
   gfxVersion = args.gfx_version,
-  dGPUPoolID = 1, m_type = args.m_type)
+  dGPUPoolID = 0, m_type = args.m_type)

 renderDriNum = 128
 render_driver = GPURenderDriver(filename = f'dri/renderD{renderDriNum}')
diff --git a/src/gpu-compute/GPU.py b/src/gpu-compute/GPU.py
index ace83a5..107899e 100644
--- a/src/gpu-compute/GPU.py
+++ b/src/gpu-compute/GPU.py
@@ -243,7 +243,7 @@
 device = Param.GPUCommandProcessor('GPU controlled by this driver')
 isdGPU = Param.Bool(False, 'Driver is for a dGPU')
 gfxVersion = Param.GfxVersion('gfx801', 'ISA of gpu to model')
-dGPUPoolID = Param.Int(False, 'Pool ID for dGPU.')
+dGPUPoolID = Param.Int(0, 'Pool ID for dGPU.')
 # Default Mtype for caches
 #-- 1   1   1   C_RW_S  (Cached-ReadWrite-Shared)
 #-- 1   1   0   C_RW_US (Cached-ReadWrite-Unshared)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47527
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: I0f1161588279a335bbd0d8ae7acda97fc23201b5
Gerrit-Change-Number: 47527
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: configs: Set valid heap_type values

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47528 )



Change subject: configs: Set valid heap_type values
..

configs: Set valid heap_type values

The variables that were used to set heap_type don't exist.
Explicitly set them to the proper values.

Change-Id: I8df7fca7442f6640be1154ef147c4e302ea491bb
---
M configs/example/hsaTopology.py
1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/configs/example/hsaTopology.py b/configs/example/hsaTopology.py
index 28060cc..da3bc57 100644
--- a/configs/example/hsaTopology.py
+++ b/configs/example/hsaTopology.py
@@ -140,7 +140,7 @@
 # CPU memory reporting
 mem_dir = joinpath(node_dir, 'mem_banks/0')
 remake_dir(mem_dir)
-mem_prop = 'heap_type %s\n' % HsaHeaptype.HSA_HEAPTYPE_SYSTEM.value + \
+mem_prop = 'heap_type 0\n'   +  
\

'size_in_bytes 33704329216\n'+ \
'flags 0\n'  + \
'width 72\n' + \
@@ -221,7 +221,7 @@
 # TODO: Extract size, clk, and width from sim paramters
 mem_dir = joinpath(node_dir, 'mem_banks/0')
 remake_dir(mem_dir)
-mem_prop = 'heap_type %s\n' % heap_type.value   + \
+mem_prop = 'heap_type 1\n'  + \
'size_in_bytes 17163091968\n'+ \
'flags 0\n'  + \
'width 2048\n'   + \

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47528
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: I8df7fca7442f6640be1154ef147c4e302ea491bb
Gerrit-Change-Number: 47528
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Add decoding for implemented insts

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47521 )



Change subject: arch-vega: Add decoding for implemented insts
..

arch-vega: Add decoding for implemented insts

Certain instructions were implemented in instructions.cc,
but weren't actually being decoded by the decoder, causing
the decoder to return nullptr for valid instructions.

This patch fixes the decoder to return the proper instruction
class for implemented instructions

Change-Id: I8d8525a1c435147017cb38d9df8e1675986ef04b
---
M src/arch/amdgpu/vega/decoder.cc
1 file changed, 9 insertions(+), 9 deletions(-)



diff --git a/src/arch/amdgpu/vega/decoder.cc  
b/src/arch/amdgpu/vega/decoder.cc

index 363f7e1..480d326 100644
--- a/src/arch/amdgpu/vega/decoder.cc
+++ b/src/arch/amdgpu/vega/decoder.cc
@@ -4155,19 +4155,19 @@
 GPUStaticInst*
 Decoder::decode_OP_VOP2__V_ADD_U32(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP2__V_ADD_U32(>iFmt_VOP2);
 }

 GPUStaticInst*
 Decoder::decode_OP_VOP2__V_SUB_U32(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP2__V_SUB_U32(>iFmt_VOP2);
 }

 GPUStaticInst*
 Decoder::decode_OP_VOP2__V_SUBREV_U32(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP2__V_SUBREV_U32(>iFmt_VOP2);
 }

 GPUStaticInst*
@@ -4443,7 +4443,7 @@
 GPUStaticInst*
 Decoder::decode_OP_SOP2__S_MUL_HI_I32(MachInst iFmt)
 {
-return nullptr;
+return new Inst_SOP2__S_MUL_I32(>iFmt_SOP2);
 }

 GPUStaticInst*
@@ -6939,31 +6939,31 @@
 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_F16(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP3__V_MAD_F16(>iFmt_VOP3A);
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_U16(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP3__V_MAD_U16(>iFmt_VOP3A);
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_MAD_I16(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP3__V_MAD_I16(>iFmt_VOP3A);
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_FMA_F16(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP3__V_FMA_F16(>iFmt_VOP3A);
 }

 GPUStaticInst*
 Decoder::decode_OPU_VOP3__V_DIV_FIXUP_F16(MachInst iFmt)
 {
-return nullptr;
+return new Inst_VOP3__V_DIV_FIXUP_F16(>iFmt_VOP3A);
 }

 GPUStaticInst*

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47521
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: I8d8525a1c435147017cb38d9df8e1675986ef04b
Gerrit-Change-Number: 47521
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Fix s_endpgm instruction

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47519 )



Change subject: arch-vega: Fix s_endpgm instruction
..

arch-vega: Fix s_endpgm instruction

Copy over changes that had been made to s_engpgm in GCN3
but weren't added to the Vega implementation

Change-Id: I1063f83b1ce8f7c5e451c8c227265715c8f725b9
---
M src/arch/amdgpu/vega/insts/instructions.cc
1 file changed, 11 insertions(+), 2 deletions(-)



diff --git a/src/arch/amdgpu/vega/insts/instructions.cc  
b/src/arch/amdgpu/vega/insts/instructions.cc

index b0a6cb0..74be2cf 100644
--- a/src/arch/amdgpu/vega/insts/instructions.cc
+++ b/src/arch/amdgpu/vega/insts/instructions.cc
@@ -4134,7 +4134,12 @@
 ComputeUnit *cu = gpuDynInst->computeUnit();

 // delete extra instructions fetched for completed work-items
-wf->instructionBuffer.clear();
+wf->instructionBuffer.erase(wf->instructionBuffer.begin() + 1,
+wf->instructionBuffer.end());
+
+if (wf->pendingFetch) {
+wf->dropFetch = true;
+}

 wf->computeUnit->fetchStage.fetchUnit(wf->simdId)
 .flushBuf(wf->wfSlotId);
@@ -4212,8 +4217,11 @@
 bool kernelEnd =
  
wf->computeUnit->shader->dispatcher().isReachingKernelEnd(wf);


+bool relNeeded =
+wf->computeUnit->shader->impl_kern_end_rel;
+
 //if it is not a kernel end, then retire the workgroup directly
-if (!kernelEnd) {
+if (!kernelEnd || !relNeeded) {
 wf->computeUnit->shader->dispatcher().notifyWgCompl(wf);
 wf->setStatus(Wavefront::S_STOPPED);
 wf->computeUnit->completedWGs++;
@@ -4229,6 +4237,7 @@
  * the complex
  */
 setFlag(MemSync);
+setFlag(GlobalSegment);
 // Notify Memory System of Kernel Completion
 // Kernel End = isKernel + isMemSync
 wf->setStatus(Wavefront::S_RETURNING);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47519
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: I1063f83b1ce8f7c5e451c8c227265715c8f725b9
Gerrit-Change-Number: 47519
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: arch-vega: Add missing return to flat_load_dwordx4

2021-07-01 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47520 )



Change subject: arch-vega: Add missing return to flat_load_dwordx4
..

arch-vega: Add missing return to flat_load_dwordx4

Change-Id: Ibf56c25a3d22d3c12ae2c1bb11f00f4a44b5919a
---
M src/arch/amdgpu/vega/insts/instructions.cc
1 file changed, 1 insertion(+), 0 deletions(-)



diff --git a/src/arch/amdgpu/vega/insts/instructions.cc  
b/src/arch/amdgpu/vega/insts/instructions.cc

index 74be2cf..793bdce 100644
--- a/src/arch/amdgpu/vega/insts/instructions.cc
+++ b/src/arch/amdgpu/vega/insts/instructions.cc
@@ -42981,6 +42981,7 @@
 if (gpuDynInst->exec_mask.none()) {
 wf->decVMemInstsIssued();
 wf->decLGKMInstsIssued();
+return;
 }

 gpuDynInst->execUnitId = wf->execUnitId;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47520
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: Ibf56c25a3d22d3c12ae2c1bb11f00f4a44b5919a
Gerrit-Change-Number: 47520
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: gpu-compute: Add missing override in render driver

2021-07-01 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47479 )


Change subject: gpu-compute: Add missing override in render driver
..

gpu-compute: Add missing override in render driver

This fixes the build error in the clang-11 compiler check for GCN3_X86.

Change-Id: I2245589182b80811b8bc07409196adca98899213
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47479
Reviewed-by: Matt Sinclair 
Maintainer: Matt Sinclair 
Tested-by: kokoro 
---
M src/gpu-compute/gpu_render_driver.hh
1 file changed, 1 insertion(+), 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_render_driver.hh  
b/src/gpu-compute/gpu_render_driver.hh

index 5a4ce1b..f94fdef 100644
--- a/src/gpu-compute/gpu_render_driver.hh
+++ b/src/gpu-compute/gpu_render_driver.hh
@@ -46,7 +46,7 @@
 int open(ThreadContext *tc, int mode, int flags) override;

 int
-ioctl(ThreadContext *tc, unsigned req, Addr buf)
+ioctl(ThreadContext *tc, unsigned req, Addr buf) override
 {
 return -EBADF;
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47479
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: I2245589182b80811b8bc07409196adca98899213
Gerrit-Change-Number: 47479
Gerrit-PatchSet: 2
Gerrit-Owner: Matthew Poremba 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: Matthew Poremba 
Gerrit-Reviewer: kokoro 
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

[gem5-dev] Change in gem5/gem5[develop]: util-gem5art: Simplify gem5art Run

2021-07-01 Thread Jason Lowe-Power (Gerrit) via gem5-dev
Jason Lowe-Power has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47465 )



Change subject: util-gem5art: Simplify gem5art Run
..

util-gem5art: Simplify gem5art Run

This changeset removes some of the duplicate information in the gem5 run
object making it a little simpler to use the createRun functions.

Change-Id: I36ee105166e41407c21e36d9bc71fd4db89fb1e8
Signed-off-by: Jason Lowe-Power 
---
M util/gem5art/run/gem5art/run.py
M util/gem5art/run/tests/test_run.py
2 files changed, 16 insertions(+), 31 deletions(-)



diff --git a/util/gem5art/run/gem5art/run.py  
b/util/gem5art/run/gem5art/run.py

index a32d899..89bd463 100644
--- a/util/gem5art/run/gem5art/run.py
+++ b/util/gem5art/run/gem5art/run.py
@@ -57,7 +57,7 @@
 hash: str
 type: str
 name: str
-gem5_binary: Path
+gem5_binary_path: Path
 run_script: Path
 gem5_artifact: Artifact
 gem5_git_artifact: Artifact
@@ -74,8 +74,8 @@

 outdir: Path

-linux_binary: Path
-disk_image: Path
+linux_binary_path: Path
+disk_image_path: Path
 linux_binary_artifact: Artifact
 disk_image_artifact: Artifact

@@ -100,7 +100,6 @@
 def _create(
 cls,
 name: str,
-gem5_binary: Path,
 run_script: Path,
 outdir: Path,
 gem5_artifact: Artifact,
@@ -115,7 +114,7 @@
 """
 run = cls()
 run.name = name
-run.gem5_binary = gem5_binary
+run.gem5_binary_path = gem5_artifact.path
 run.run_script = run_script
 run.gem5_artifact = gem5_artifact
 run.gem5_git_artifact = gem5_git_artifact
@@ -131,7 +130,7 @@
 run.outdir = outdir.resolve()  # ensure this is absolute

 # Assumes **//gem5.
-run.gem5_name = run.gem5_binary.parent.name
+run.gem5_name = run.gem5_binary_path.parent.name
 # Assumes **/.py
 run.script_name = run.run_script.stem

@@ -157,7 +156,6 @@
 def createSERun(
 cls,
 name: str,
-gem5_binary: str,
 run_script: str,
 outdir: str,
 gem5_artifact: Artifact,
@@ -171,8 +169,7 @@
 name is the name of the run. The name is not necessarily unique.  
The

 name could be used to query the results of the run.

-gem5_binary and run_script are the paths to the binary to run
-and the script to pass to gem5. Full paths are better.
+run_script is the path to the run script to pass to gem5.

 The artifact parameters (gem5_artifact, gem5_git_artifact, and
 run_script_git_artifact) are used to ensure this is reproducible  
run.

@@ -188,7 +185,6 @@

 run = cls._create(
 name,
-Path(gem5_binary),
 Path(run_script),
 Path(outdir),
 gem5_artifact,
@@ -209,7 +205,7 @@
 run.string += " ".join(run.params)

 run.command = [
-str(run.gem5_binary),
+str(run.gem5_binary_path),
 "-re",
 f"--outdir={run.outdir}",
 str(run.run_script),
@@ -229,14 +225,11 @@
 def createFSRun(
 cls,
 name: str,
-gem5_binary: str,
 run_script: str,
 outdir: str,
 gem5_artifact: Artifact,
 gem5_git_artifact: Artifact,
 run_script_git_artifact: Artifact,
-linux_binary: str,
-disk_image: str,
 linux_binary_artifact: Artifact,
 disk_image_artifact: Artifact,
 *params: str,
@@ -247,11 +240,7 @@
 name is the name of the run. The name is not necessarily unique.  
The

 name could be used to query the results of the run.

-gem5_binary and run_script are the paths to the binary to run
-and the script to pass to gem5.
-
-The linux_binary is the kernel to run and the disk_image is the  
path

-to the disk image to use.
+run_script is the path to the run script to pass to gem5.

 Further parameters can be passed via extra arguments. These
 parameters will be passed in order to the gem5 run script.
@@ -264,10 +253,8 @@
 a file `info.json` in the outdir which contains a serialized  
version

 of this class.
 """
-
 run = cls._create(
 name,
-Path(gem5_binary),
 Path(run_script),
 Path(outdir),
 gem5_artifact,
@@ -277,15 +264,15 @@
 timeout,
 check_failure,
 )
-run.linux_binary = Path(linux_binary)
-run.disk_image = Path(disk_image)
+run.linux_binary_path = Path(linux_binary_artifact.path)
+run.disk_image_path = Path(disk_image_artifact.path)
 run.linux_binary_artifact = linux_binary_artifact
 run.disk_image_artifact = disk_image_artifact

 # Assumes **/
-run.linux_name = run.linux_binary.name
+

[gem5-dev] Change in gem5/gem5[develop]: util-gem5art: Simplify rerunning failing runs

2021-07-01 Thread Jason Lowe-Power (Gerrit) via gem5-dev
Jason Lowe-Power has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47464 )



Change subject: util-gem5art: Simplify rerunning failing runs
..

util-gem5art: Simplify rerunning failing runs

Often, a gem5 experiment will fail for some reason. This happens
non-deterministically when fastforwarding with KVM making it more
difficult to handle.

This change allows the user to specify a function `check_failure` to
check to see if the test has failed. An example would be to open the
terminal and check to see if the kernel has panicked.

Additionally, this change adds a rerun function to rerun a particular
run that has failed.

Change-Id: Ib4a8d47c824254ae89ac9e1593ebd2710e263146
Signed-off-by: Jason Lowe-Power 
---
M util/gem5art/run/gem5art/run.py
1 file changed, 88 insertions(+), 6 deletions(-)



diff --git a/util/gem5art/run/gem5art/run.py  
b/util/gem5art/run/gem5art/run.py

index c367f6d..a32d899 100644
--- a/util/gem5art/run/gem5art/run.py
+++ b/util/gem5art/run/gem5art/run.py
@@ -39,7 +39,7 @@
 import signal
 import subprocess
 import time
-from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
+from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple,  
Union

 from uuid import UUID, uuid4
 import zipfile

@@ -64,6 +64,7 @@
 run_script_git_artifact: Artifact
 params: Tuple[str, ...]
 timeout: int
+check_failure: Callable[["gem5Run"], bool]

 gem5_name: str
 script_name: str
@@ -93,6 +94,8 @@
 results: Optional[Artifact]
 artifacts: List[Artifact]

+rerunnable: bool
+
 @classmethod
 def _create(
 cls,
@@ -105,6 +108,7 @@
 run_script_git_artifact: Artifact,
 params: Tuple[str, ...],
 timeout: int,
+check_failure: Callable[["gem5Run"], bool],
 ) -> "gem5Run":
 """
 Shared code between SE and FS when creating a run object.
@@ -119,6 +123,9 @@
 run.params = params
 run.timeout = timeout

+# Note: Mypy doesn't support monkey patching like this
+run.check_failure = check_failure  # type: ignore
+
 run._id = uuid4()

 run.outdir = outdir.resolve()  # ensure this is absolute
@@ -142,6 +149,8 @@
 # Initially, there are no results
 run.results = None

+run.rerunnable = False
+
 return run

 @classmethod
@@ -156,6 +165,7 @@
 run_script_git_artifact: Artifact,
 *params: str,
 timeout: int = 60 * 15,
+check_failure: Callable[["gem5Run"], bool] = lambda run: False,
 ) -> "gem5Run":
 """
 name is the name of the run. The name is not necessarily unique.  
The

@@ -186,6 +196,7 @@
 run_script_git_artifact,
 params,
 timeout,
+check_failure,
 )

 run.artifacts = [
@@ -230,6 +241,7 @@
 disk_image_artifact: Artifact,
 *params: str,
 timeout: int = 60 * 15,
+check_failure: Callable[["gem5Run"], bool] = lambda run: False,
 ) -> "gem5Run":
 """
 name is the name of the run. The name is not necessarily unique.  
The

@@ -244,6 +256,10 @@
 Further parameters can be passed via extra arguments. These
 parameters will be passed in order to the gem5 run script.

+check_failure is a user-defined function that will be executed
+periodically (e.g., every 10 seconds) to check the health of the
+simulation. When it returns True, the simulation will be killed
+
 Note: When instantiating this class for the first time, it will  
create
 a file `info.json` in the outdir which contains a serialized  
version

 of this class.
@@ -259,6 +275,7 @@
 run_script_git_artifact,
 params,
 timeout,
+check_failure,
 )
 run.linux_binary = Path(linux_binary)
 run.disk_image = Path(disk_image)
@@ -397,6 +414,10 @@
 # Remove list of artifacts
 del d["artifacts"]

+# Doesn't make sense to serialize the user-specified fail function
+if "check_failure" in d.keys():
+del d["check_failure"]
+
 # Replace the artifacts with their UUIDs
 for k, v in d.items():
 if isinstance(v, Artifact):
@@ -438,7 +459,7 @@
 d = self._convertForJson(self._getSerializable())
 return json.dumps(d)

-def run(self, task: Any = None, cwd: str = ".") -> None:
+def _run(self, task: Any = None, cwd: str = ".") -> None:
 """Actually run the test.

 Calls Popen with the command to fork a new process.
@@ -452,11 +473,8 @@
 process to run in a different directory than the running process.  
Note

 that only the spawned process runs in the new directory.
 """
-# Check if the run is already in the database
+# Connect to the 

[gem5-dev] Change in gem5/gem5[develop]: util-gem5art: Decouple artifacts from mongodb

2021-07-01 Thread Jason Lowe-Power (Gerrit) via gem5-dev
Jason Lowe-Power has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47463 )



Change subject: util-gem5art: Decouple artifacts from mongodb
..

util-gem5art: Decouple artifacts from mongodb

This commit does a few things to decouple the artifacts from mongodb.
- Creates an ArtifactFileDB which stores artifacts in a json file on the
local machine
- Adds tests fro the artifact file DB
- Sets the file database to be default if pymongo isn't installed
- Extends the Artifact class to prepare for downloading artifacts from
gem5-resources

Change-Id: I1bceef94dc53c066d1c0475e79c9a1ad1f1a6202
Signed-off-by: Jason Lowe-Power 
---
M util/gem5art/artifact/gem5art/artifact/_artifactdb.py
M util/gem5art/artifact/gem5art/artifact/artifact.py
M util/gem5art/artifact/tests/test_artifact.py
A util/gem5art/artifact/tests/test_filedb.py
4 files changed, 425 insertions(+), 32 deletions(-)



diff --git a/util/gem5art/artifact/gem5art/artifact/_artifactdb.py  
b/util/gem5art/artifact/gem5art/artifact/_artifactdb.py

index 4ffb0a0..6714c9c 100644
--- a/util/gem5art/artifact/gem5art/artifact/_artifactdb.py
+++ b/util/gem5art/artifact/gem5art/artifact/_artifactdb.py
@@ -36,14 +36,24 @@

 from abc import ABC, abstractmethod

-import gridfs  # type: ignore
+import copy
+import json
 import os
 from pathlib import Path
-from pymongo import MongoClient  # type: ignore
-from typing import Any, Dict, Iterable, Union, Type
+import shutil
+from typing import Any, Dict, Iterable, Union, Type, List, Tuple
 from urllib.parse import urlparse
 from uuid import UUID

+try:
+import gridfs  # type: ignore
+from pymongo import MongoClient  # type: ignore
+
+MONGO_SUPPORT = True
+except ModuleNotFoundError:
+# If pymongo isn't installed, then disable support for it
+MONGO_SUPPORT = False
+

 class ArtifactDB(ABC):
 """
@@ -51,7 +61,7 @@
 """

 @abstractmethod
-def __init__(self, uri: str):
+def __init__(self, uri: str) -> None:
 """Initialize the database with a URI"""
 pass

@@ -205,11 +215,194 @@
 yield d


+class ArtifactFileDB(ArtifactDB):
+"""
+This is a file-based database where Artifacts (as defined in  
artifacts.py)

+are stored in a JSON file.
+
+This database stores a list of serialized artifacts in a JSON file.
+This database is not thread-safe.
+
+If the user specifies a valid path in the environment variable
+GEM5ART_STORAGE then this database will copy all artifacts to that
+directory named with their UUIDs.
+"""
+
+class ArtifactEncoder(json.JSONEncoder):
+def default(self, obj):
+if isinstance(obj, UUID):
+return str(obj)
+return ArtifactFileDB.ArtifactEncoder(self, obj)
+
+_json_file: Path
+_uuid_artifact_map: Dict[str, Dict[str, str]]
+_hash_uuid_map: Dict[str, List[str]]
+_storage_enabled: bool
+_storage_path: Path
+
+def __init__(self, uri: str) -> None:
+"""Initialize the file-driven database from a JSON file.
+If the file doesn't exist, a new file will be created.
+"""
+parsed_uri = urlparse(uri)
+# using urlparse to parse relative/absolute file path
+# abs path: urlparse("file:///path/to/file") ->
+#   (netloc='', path='/path/to/file')
+# rel path: urlparse("file://path/to/file") ->
+#   (netloc='path', path='/to/file')
+# so, the filepath would be netloc+path for both cases
+self._json_file = Path(parsed_uri.netloc) / Path(parsed_uri.path)
+storage_path = os.environ.get("GEM5ART_STORAGE", "")
+self._storage_enabled = True if storage_path else False
+self._storage_path = Path(storage_path)
+if (
+self._storage_enabled
+and self._storage_path.exists()
+and not self._storage_path.is_dir()
+):
+raise Exception(
+f"GEM5ART_STORAGE={storage_path} exists and is not a  
directory"

+)
+if self._storage_enabled:
+os.makedirs(self._storage_path, exist_ok=True)
+
+self._uuid_artifact_map, self._hash_uuid_map =  
self._load_from_file(

+self._json_file
+)
+
+def put(self, key: UUID, artifact: Dict[str, Union[str, UUID]]) ->  
None:

+"""Insert the artifact into the database with the key."""
+assert artifact["_id"] == key
+assert isinstance(artifact["hash"], str)
+self.insert_artifact(key, artifact["hash"], artifact)
+
+def upload(self, key: UUID, path: Path) -> None:
+"""Copy the artifact to the folder specified by GEM5ART_STORAGE."""
+if not self._storage_enabled:
+return
+src_path = path
+dst_path = self._storage_path / str(key)
+if not dst_path.exists():
+shutil.copy2(src_path, 

[gem5-dev] Change in gem5/gem5[develop]: gpu-compute: Add missing override in render driver

2021-07-01 Thread Matthew Poremba (Gerrit) via gem5-dev
Matthew Poremba has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47479 )



Change subject: gpu-compute: Add missing override in render driver
..

gpu-compute: Add missing override in render driver

This fixes the build error in the clang-11 compiler check for GCN3_X86.

Change-Id: I2245589182b80811b8bc07409196adca98899213
---
M src/gpu-compute/gpu_render_driver.hh
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/gpu-compute/gpu_render_driver.hh  
b/src/gpu-compute/gpu_render_driver.hh

index 5a4ce1b..f94fdef 100644
--- a/src/gpu-compute/gpu_render_driver.hh
+++ b/src/gpu-compute/gpu_render_driver.hh
@@ -46,7 +46,7 @@
 int open(ThreadContext *tc, int mode, int flags) override;

 int
-ioctl(ThreadContext *tc, unsigned req, Addr buf)
+ioctl(ThreadContext *tc, unsigned req, Addr buf) override
 {
 return -EBADF;
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47479
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: I2245589182b80811b8bc07409196adca98899213
Gerrit-Change-Number: 47479
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: mem-garnet: Add a garnet namespace

2021-07-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47306 )


Change subject: mem-garnet: Add a garnet namespace
..

mem-garnet: Add a garnet namespace

Add a namespace encapsulating all garnet files.

GarnetSyntheticTraffic, from
cpu/testers/garnet_synthetic_traffic/GarnetSyntheticTraffic.hh
has not been added to this namespace.

Change-Id: I5304ad3130100ba325e35e20883ee9286f51a75a
Issued-on: https://gem5.atlassian.net/browse/GEM5-987
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47306
Tested-by: kokoro 
Reviewed-by: Srikant Bharadwaj 
Reviewed-by: Jason Lowe-Power 
Maintainer: Srikant Bharadwaj 
Maintainer: Jason Lowe-Power 
---
M src/mem/ruby/network/garnet/CommonTypes.hh
M src/mem/ruby/network/garnet/Credit.cc
M src/mem/ruby/network/garnet/Credit.hh
M src/mem/ruby/network/garnet/CreditLink.hh
M src/mem/ruby/network/garnet/CrossbarSwitch.cc
M src/mem/ruby/network/garnet/CrossbarSwitch.hh
M src/mem/ruby/network/garnet/GarnetLink.cc
M src/mem/ruby/network/garnet/GarnetLink.hh
M src/mem/ruby/network/garnet/GarnetLink.py
M src/mem/ruby/network/garnet/GarnetNetwork.cc
M src/mem/ruby/network/garnet/GarnetNetwork.hh
M src/mem/ruby/network/garnet/GarnetNetwork.py
M src/mem/ruby/network/garnet/InputUnit.cc
M src/mem/ruby/network/garnet/InputUnit.hh
M src/mem/ruby/network/garnet/NetworkBridge.cc
M src/mem/ruby/network/garnet/NetworkBridge.hh
M src/mem/ruby/network/garnet/NetworkInterface.cc
M src/mem/ruby/network/garnet/NetworkInterface.hh
M src/mem/ruby/network/garnet/NetworkLink.cc
M src/mem/ruby/network/garnet/NetworkLink.hh
M src/mem/ruby/network/garnet/OutVcState.cc
M src/mem/ruby/network/garnet/OutVcState.hh
M src/mem/ruby/network/garnet/OutputUnit.cc
M src/mem/ruby/network/garnet/OutputUnit.hh
M src/mem/ruby/network/garnet/Router.cc
M src/mem/ruby/network/garnet/Router.hh
M src/mem/ruby/network/garnet/RoutingUnit.cc
M src/mem/ruby/network/garnet/RoutingUnit.hh
M src/mem/ruby/network/garnet/SwitchAllocator.cc
M src/mem/ruby/network/garnet/SwitchAllocator.hh
M src/mem/ruby/network/garnet/VirtualChannel.cc
M src/mem/ruby/network/garnet/VirtualChannel.hh
M src/mem/ruby/network/garnet/flit.cc
M src/mem/ruby/network/garnet/flit.hh
M src/mem/ruby/network/garnet/flitBuffer.cc
M src/mem/ruby/network/garnet/flitBuffer.hh
36 files changed, 149 insertions(+), 10 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Srikant Bharadwaj: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/ruby/network/garnet/CommonTypes.hh  
b/src/mem/ruby/network/garnet/CommonTypes.hh

index c0d8af2..c2b8b65 100644
--- a/src/mem/ruby/network/garnet/CommonTypes.hh
+++ b/src/mem/ruby/network/garnet/CommonTypes.hh
@@ -36,6 +36,9 @@
 namespace gem5
 {

+namespace garnet
+{
+
 // All common enums and typedefs go here

 enum flit_type {HEAD_, BODY_, TAIL_, HEAD_TAIL_,
@@ -68,6 +71,7 @@

 #define INFINITE_ 1

+} // namespace garnet
 } // namespace gem5

 #endif //__MEM_RUBY_NETWORK_GARNET_0_COMMONTYPES_HH__
diff --git a/src/mem/ruby/network/garnet/Credit.cc  
b/src/mem/ruby/network/garnet/Credit.cc

index 5624005..e88faa0 100644
--- a/src/mem/ruby/network/garnet/Credit.cc
+++ b/src/mem/ruby/network/garnet/Credit.cc
@@ -35,6 +35,9 @@
 namespace gem5
 {

+namespace garnet
+{
+
 // Credit Signal for buffers inside VC
 // Carries m_vc (inherits from flit.hh)
 // and m_is_free_signal (whether VC is free or not)
@@ -83,4 +86,5 @@
 out << "]";
 }

+} // namespace garnet
 } // namespace gem5
diff --git a/src/mem/ruby/network/garnet/Credit.hh  
b/src/mem/ruby/network/garnet/Credit.hh

index 2db47d0..98469e1 100644
--- a/src/mem/ruby/network/garnet/Credit.hh
+++ b/src/mem/ruby/network/garnet/Credit.hh
@@ -41,6 +41,9 @@
 namespace gem5
 {

+namespace garnet
+{
+
 // Credit Signal for buffers inside VC
 // Carries m_vc (inherits from flit.hh)
 // and m_is_free_signal (whether VC is free or not)
@@ -64,6 +67,7 @@
 bool m_is_free_signal;
 };

+} // namespace garnet
 } // namespace gem5

 #endif // __MEM_RUBY_NETWORK_GARNET_0_CREDIT_HH__
diff --git a/src/mem/ruby/network/garnet/CreditLink.hh  
b/src/mem/ruby/network/garnet/CreditLink.hh

index 96842dc..c85dc4e 100644
--- a/src/mem/ruby/network/garnet/CreditLink.hh
+++ b/src/mem/ruby/network/garnet/CreditLink.hh
@@ -37,6 +37,9 @@
 namespace gem5
 {

+namespace garnet
+{
+
 class CreditLink : public NetworkLink
 {
   public:
@@ -44,6 +47,7 @@
 CreditLink(const Params ) : NetworkLink(p) {}
 };

+} // namespace garnet
 } // namespace gem5

 #endif // __MEM_RUBY_NETWORK_GARNET_0_CREDITLINK_HH__
diff --git a/src/mem/ruby/network/garnet/CrossbarSwitch.cc  
b/src/mem/ruby/network/garnet/CrossbarSwitch.cc

index 2e6c29d..d94f728 100644
--- a/src/mem/ruby/network/garnet/CrossbarSwitch.cc
+++ 

[gem5-dev] Change in gem5/gem5[develop]: docker-util: Remove building of GCC 5 and 6 Docker images

2021-07-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47462 )



Change subject: docker-util: Remove building of GCC 5 and 6 Docker images
..

docker-util: Remove building of GCC 5 and 6 Docker images

Building of these images is no longer required as GCC 5 and 6 have been
dropped.

Change-Id: Ife0331843214fe545c5620a2f77ede3adb436700
---
M util/cloudbuild/cloudbuild_create_images.yaml
1 file changed, 0 insertions(+), 16 deletions(-)



diff --git a/util/cloudbuild/cloudbuild_create_images.yaml  
b/util/cloudbuild/cloudbuild_create_images.yaml

index 31876fb..7549012 100644
--- a/util/cloudbuild/cloudbuild_create_images.yaml
+++ b/util/cloudbuild/cloudbuild_create_images.yaml
@@ -20,20 +20,6 @@
 - name: 'gcr.io/cloud-builders/docker'
   args: ['build',
 '-t',
-'gcr.io/$PROJECT_ID/gcc-version-5:latest',
-'--build-arg', 'version=5',
-'util/dockerfiles/ubuntu-18.04_gcc-version']
-
-- name: 'gcr.io/cloud-builders/docker'
-  args: ['build',
-'-t',
-'gcr.io/$PROJECT_ID/gcc-version-6:latest',
-'--build-arg', 'version=6',
-'util/dockerfiles/ubuntu-18.04_gcc-version']
-
-- name: 'gcr.io/cloud-builders/docker'
-  args: ['build',
-'-t',
 'gcr.io/$PROJECT_ID/gcc-version-7:latest',
 '--build-arg', 'version=7',
 'util/dockerfiles/ubuntu-18.04_gcc-version']
@@ -110,8 +96,6 @@
 images: ['gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest',
  'gcr.io/$PROJECT_ID/ubuntu-20.04_min-dependencies:latest',
  'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest',
- 'gcr.io/$PROJECT_ID/gcc-version-5:latest',
- 'gcr.io/$PROJECT_ID/gcc-version-6:latest',
  'gcr.io/$PROJECT_ID/gcc-version-7:latest',
  'gcr.io/$PROJECT_ID/gcc-version-8:latest',
  'gcr.io/$PROJECT_ID/gcc-version-9:latest',

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47462
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: Ife0331843214fe545c5620a2f77ede3adb436700
Gerrit-Change-Number: 47462
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc,tests: Remove support for GCC 6

2021-07-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47460 )



Change subject: misc,tests: Remove support for GCC 6
..

misc,tests: Remove support for GCC 6

Supporting GCC 7 onwards will allow us to move to the C++17 standard.

Change-Id: I805945230d77dacdc6b0a863153b28276025ecdc
---
M tests/compiler-tests.sh
1 file changed, 0 insertions(+), 1 deletion(-)



diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index 11b84a0..bf1d281 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -14,7 +14,6 @@
 "gcc-version-9"
 "gcc-version-8"
 "gcc-version-7"
-"gcc-version-6"
 "clang-version-11"
 "clang-version-10"
 "clang-version-9"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47460
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: I805945230d77dacdc6b0a863153b28276025ecdc
Gerrit-Change-Number: 47460
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: misc,tests: Remove support for GCC 5

2021-07-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47459 )



Change subject: misc,tests: Remove support for GCC 5
..

misc,tests: Remove support for GCC 5

Change-Id: I9d2e2958757d13330500fae555dde0abad58e23c
---
M tests/compiler-tests.sh
1 file changed, 0 insertions(+), 1 deletion(-)



diff --git a/tests/compiler-tests.sh b/tests/compiler-tests.sh
index 29a4268..11b84a0 100755
--- a/tests/compiler-tests.sh
+++ b/tests/compiler-tests.sh
@@ -15,7 +15,6 @@
 "gcc-version-8"
 "gcc-version-7"
 "gcc-version-6"
-"gcc-version-5"
 "clang-version-11"
 "clang-version-10"
 "clang-version-9"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47459
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: I9d2e2958757d13330500fae555dde0abad58e23c
Gerrit-Change-Number: 47459
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
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

[gem5-dev] Change in gem5/gem5[develop]: mem-cache: Add Signature-Based Hit Predictor replacement policy

2021-07-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/38118 )


Change subject: mem-cache: Add Signature-Based Hit Predictor replacement  
policy

..

mem-cache: Add Signature-Based Hit Predictor replacement policy

Add the SHiP Replacement Policy, as described in "SHiP: Signature-
based Hit Predictor for High Performance Caching", by Wu et al.

Instruction Sequence signatures have not been implemented.

Change-Id: I44f00d26eab4c96c9c5bc29740862a87356d30d1
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38118
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M src/mem/cache/replacement_policies/ReplacementPolicies.py
M src/mem/cache/replacement_policies/SConscript
A src/mem/cache/replacement_policies/ship_rp.cc
A src/mem/cache/replacement_policies/ship_rp.hh
4 files changed, 386 insertions(+), 0 deletions(-)

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



diff --git a/src/mem/cache/replacement_policies/ReplacementPolicies.py  
b/src/mem/cache/replacement_policies/ReplacementPolicies.py

index 11de0b2..7003abe 100644
--- a/src/mem/cache/replacement_policies/ReplacementPolicies.py
+++ b/src/mem/cache/replacement_policies/ReplacementPolicies.py
@@ -114,6 +114,31 @@
 btp = 100
 num_bits = 1

+class SHiPRP(BRRIPRP):
+type = 'SHiPRP'
+abstract = True
+cxx_class = 'replacement_policy::SHiP'
+cxx_header = "mem/cache/replacement_policies/ship_rp.hh"
+
+shct_size = Param.Unsigned(16384, "Number of SHCT entries")
+# By default any value greater than 0 is enough to change insertion  
policy

+insertion_threshold = Param.Percent(1,
+"Percentage at which an entry changes insertion policy")
+# Always make hits mark entries as last to be evicted
+hit_priority = True
+# Let the predictor decide when to change insertion policy
+btp = 0
+
+class SHiPMemRP(SHiPRP):
+type = 'SHiPMemRP'
+cxx_class = 'replacement_policy::SHiPMem'
+cxx_header = "mem/cache/replacement_policies/ship_rp.hh"
+
+class SHiPPCRP(SHiPRP):
+type = 'SHiPPCRP'
+cxx_class = 'replacement_policy::SHiPPC'
+cxx_header = "mem/cache/replacement_policies/ship_rp.hh"
+
 class TreePLRURP(BaseReplacementPolicy):
 type = 'TreePLRURP'
 cxx_class = 'replacement_policy::TreePLRU'
diff --git a/src/mem/cache/replacement_policies/SConscript  
b/src/mem/cache/replacement_policies/SConscript

index 29152a0..6370052 100644
--- a/src/mem/cache/replacement_policies/SConscript
+++ b/src/mem/cache/replacement_policies/SConscript
@@ -39,5 +39,6 @@
 Source('mru_rp.cc')
 Source('random_rp.cc')
 Source('second_chance_rp.cc')
+Source('ship_rp.cc')
 Source('tree_plru_rp.cc')
 Source('weighted_lru_rp.cc')
diff --git a/src/mem/cache/replacement_policies/ship_rp.cc  
b/src/mem/cache/replacement_policies/ship_rp.cc

new file mode 100644
index 000..7e16306
--- /dev/null
+++ b/src/mem/cache/replacement_policies/ship_rp.cc
@@ -0,0 +1,171 @@
+/**
+ * Copyright (c) 2019, 2020 Inria
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "mem/cache/replacement_policies/ship_rp.hh"
+
+#include "base/logging.hh"
+#include "params/SHiPMemRP.hh"
+#include "params/SHiPPCRP.hh"
+#include "params/SHiPRP.hh"
+
+namespace replacement_policy
+{
+
+SHiP::SHiPReplData::SHiPReplData(int 

[gem5-dev] Change in gem5/gem5[develop]: mem-cache: Make WeightedLRU inherit from LRU

2021-07-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/47399 )


Change subject: mem-cache: Make WeightedLRU inherit from LRU
..

mem-cache: Make WeightedLRU inherit from LRU

WeightedLRU adds occupancy information to LRU, so remove the
duplicated code.

Change-Id: Ifec19ea59fb411a5ed7a891e8957b1ab93cdbf05
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47399
Tested-by: kokoro 
Reviewed-by: Nikos Nikoleris 
---
M src/mem/cache/replacement_policies/ReplacementPolicies.py
M src/mem/cache/replacement_policies/weighted_lru_rp.cc
M src/mem/cache/replacement_policies/weighted_lru_rp.hh
3 files changed, 12 insertions(+), 68 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/cache/replacement_policies/ReplacementPolicies.py  
b/src/mem/cache/replacement_policies/ReplacementPolicies.py

index 34c8a1e..11de0b2 100644
--- a/src/mem/cache/replacement_policies/ReplacementPolicies.py
+++ b/src/mem/cache/replacement_policies/ReplacementPolicies.py
@@ -120,7 +120,7 @@
 cxx_header = "mem/cache/replacement_policies/tree_plru_rp.hh"
 num_leaves = Param.Int(Parent.assoc, "Number of leaves in each tree")

-class WeightedLRURP(BaseReplacementPolicy):
+class WeightedLRURP(LRURP):
 type = "WeightedLRURP"
 cxx_class = "replacement_policy::WeightedLRU"
 cxx_header = "mem/cache/replacement_policies/weighted_lru_rp.hh"
diff --git a/src/mem/cache/replacement_policies/weighted_lru_rp.cc  
b/src/mem/cache/replacement_policies/weighted_lru_rp.cc

index 3900014..334a128 100644
--- a/src/mem/cache/replacement_policies/weighted_lru_rp.cc
+++ b/src/mem/cache/replacement_policies/weighted_lru_rp.cc
@@ -43,24 +43,15 @@
 {

 WeightedLRU::WeightedLRU(const Params )
-  : Base(p)
+  : LRU(p)
 {
 }

 void
-WeightedLRU::touch(const std::shared_ptr&
-  replacement_data) const
+WeightedLRU::touch(const std::shared_ptr&  
replacement_data,

+int occupancy) const
 {
-std::static_pointer_cast(replacement_data)->
- last_touch_tick =  
curTick();

-}
-
-void
-WeightedLRU::touch(const std::shared_ptr&
-replacement_data, int occupancy) const
-{
-std::static_pointer_cast(replacement_data)->
-  last_touch_tick =  
curTick();

+LRU::touch(replacement_data);
 std::static_pointer_cast(replacement_data)->
   last_occ_ptr = occupancy;
 }
@@ -90,8 +81,8 @@
 } else if (candidate_replacement_data->last_occ_ptr ==
 victim_replacement_data->last_occ_ptr) {
 // Evict the block with a smaller tick.
-Tick time = candidate_replacement_data->last_touch_tick;
-if (time < victim_replacement_data->last_touch_tick) {
+Tick time = candidate_replacement_data->lastTouchTick;
+if (time < victim_replacement_data->lastTouchTick) {
 victim = candidate;
 }
 }
@@ -105,22 +96,4 @@
 return std::shared_ptr(new WeightedLRUReplData);
 }

-void
-WeightedLRU::reset(const std::shared_ptr&
-replacement_data) const
-{
-// Set last touch timestamp
-std::static_pointer_cast(
-replacement_data)->last_touch_tick = curTick();
-}
-
-void
-WeightedLRU::invalidate(
-const std::shared_ptr& replacement_data)
-{
-// Reset last touch timestamp
-std::static_pointer_cast(
-replacement_data)->last_touch_tick = Tick(0);
-}
-
 } // namespace replacement_policy
diff --git a/src/mem/cache/replacement_policies/weighted_lru_rp.hh  
b/src/mem/cache/replacement_policies/weighted_lru_rp.hh

index 82b31d9..2279683 100644
--- a/src/mem/cache/replacement_policies/weighted_lru_rp.hh
+++ b/src/mem/cache/replacement_policies/weighted_lru_rp.hh
@@ -37,7 +37,7 @@
 #include 

 #include "base/types.hh"
-#include "mem/cache/replacement_policies/base.hh"
+#include "mem/cache/replacement_policies/lru_rp.hh"

 struct WeightedLRURPParams;

@@ -45,59 +45,30 @@
 namespace replacement_policy
 {

-class WeightedLRU : public Base
+class WeightedLRU : public LRU
 {
   protected:
 /** Weighted LRU implementation of replacement data. */
-struct WeightedLRUReplData : ReplacementData
+struct WeightedLRUReplData : LRUReplData
 {
 /** pointer for last occupancy */
 int last_occ_ptr;

-/** Tick on which the entry was last touched. */
-Tick last_touch_tick;
-
 /**
  * Default constructor. Invalidate data.
  */
-WeightedLRUReplData() : ReplacementData(),
-last_occ_ptr(0), last_touch_tick(0) {}
+ 

[gem5-dev] Change in gem5/gem5[develop]: mem-cache: Allow sending packet information to replacement policy

2021-07-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/38117 )


Change subject: mem-cache: Allow sending packet information to replacement  
policy

..

mem-cache: Allow sending packet information to replacement policy

Some replacement policies can use information such as address or
PC to improve their re-reference prediction.

Change-Id: I412eee09efa2f3511ca1ece76fc2732509df4745
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38117
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
---
M src/mem/cache/replacement_policies/base.hh
M src/mem/cache/replacement_policies/dueling_rp.cc
M src/mem/cache/replacement_policies/dueling_rp.hh
M src/mem/cache/tags/base_set_assoc.hh
M src/mem/cache/tags/sector_tags.cc
5 files changed, 50 insertions(+), 7 deletions(-)

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



diff --git a/src/mem/cache/replacement_policies/base.hh  
b/src/mem/cache/replacement_policies/base.hh

index 0393629..0851287 100644
--- a/src/mem/cache/replacement_policies/base.hh
+++ b/src/mem/cache/replacement_policies/base.hh
@@ -33,6 +33,7 @@

 #include "base/compiler.hh"
 #include "mem/cache/replacement_policies/replaceable_entry.hh"
+#include "mem/packet.hh"
 #include "params/BaseReplacementPolicy.hh"
 #include "sim/sim_object.hh"

@@ -67,17 +68,29 @@
  * Update replacement data.
  *
  * @param replacement_data Replacement data to be touched.
+ * @param pkt Packet that generated this access.
  */
 virtual void touch(const std::shared_ptr&
-replacement_data) const =  
0;

+replacement_data, const PacketPtr pkt)
+{
+touch(replacement_data);
+}
+virtual void touch(const std::shared_ptr&
+replacement_data) const = 0;

 /**
  * Reset replacement data. Used when it's holder is inserted/validated.
  *
  * @param replacement_data Replacement data to be reset.
+ * @param pkt Packet that generated this access.
  */
 virtual void reset(const std::shared_ptr&
-replacement_data) const =  
0;

+replacement_data, const PacketPtr pkt)
+{
+reset(replacement_data);
+}
+virtual void reset(const std::shared_ptr&
+replacement_data) const = 0;

 /**
  * Find replacement victim among candidates.
diff --git a/src/mem/cache/replacement_policies/dueling_rp.cc  
b/src/mem/cache/replacement_policies/dueling_rp.cc

index e691141..3565017 100644
--- a/src/mem/cache/replacement_policies/dueling_rp.cc
+++ b/src/mem/cache/replacement_policies/dueling_rp.cc
@@ -54,6 +54,16 @@
 }

 void
+Dueling::touch(const std::shared_ptr& replacement_data,
+const PacketPtr pkt)
+{
+std::shared_ptr casted_replacement_data =
+std::static_pointer_cast(replacement_data);
+replPolicyA->touch(casted_replacement_data->replDataA, pkt);
+replPolicyB->touch(casted_replacement_data->replDataB, pkt);
+}
+
+void
 Dueling::touch(const std::shared_ptr& replacement_data)  
const

 {
 std::shared_ptr casted_replacement_data =
@@ -63,6 +73,22 @@
 }

 void
+Dueling::reset(const std::shared_ptr& replacement_data,
+const PacketPtr pkt)
+{
+std::shared_ptr casted_replacement_data =
+std::static_pointer_cast(replacement_data);
+replPolicyA->reset(casted_replacement_data->replDataA, pkt);
+replPolicyB->reset(casted_replacement_data->replDataB, pkt);
+
+// A miss in a set is a sample to the duel. A call to this function
+// implies in the replacement of an entry, which was either caused by
+// a miss, an external invalidation, or the initialization of the table
+// entry (when warming up)
+ 
duelingMonitor.sample(static_cast(casted_replacement_data.get()));

+}
+
+void
 Dueling::reset(const std::shared_ptr& replacement_data)  
const

 {
 std::shared_ptr casted_replacement_data =
diff --git a/src/mem/cache/replacement_policies/dueling_rp.hh  
b/src/mem/cache/replacement_policies/dueling_rp.hh

index 0c96ca7..314042e 100644
--- a/src/mem/cache/replacement_policies/dueling_rp.hh
+++ b/src/mem/cache/replacement_policies/dueling_rp.hh
@@ -97,8 +97,12 @@

 void invalidate(const std::shared_ptr&  
replacement_data)
  
override;

+void touch(const std::shared_ptr& replacement_data,
+const PacketPtr pkt) override;
 void touch(const std::shared_ptr& replacement_data)  
const
   
override;

+void reset(const std::shared_ptr& replacement_data,
+const PacketPtr pkt) override;
 void reset(const std::shared_ptr& replacement_data)  
const
   

[gem5-dev] Change in gem5/gem5[develop]: mem-cache: Use PacketPtr in tags's accessBlock

2021-07-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/38116 )


Change subject: mem-cache: Use PacketPtr in tags's accessBlock
..

mem-cache: Use PacketPtr in tags's accessBlock

Pass the packet to the tags, so that the replacement policies
more execution information.

Change-Id: I201884a6d60e3299fc3c9befebbb2e8b64a007f0
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38116
Tested-by: kokoro 
Reviewed-by: Nikos Nikoleris 
Reviewed-by: Jason Lowe-Power 
Maintainer: Nikos Nikoleris 
---
M src/mem/cache/base.cc
M src/mem/cache/tags/base.hh
M src/mem/cache/tags/base_set_assoc.hh
M src/mem/cache/tags/fa_lru.cc
M src/mem/cache/tags/fa_lru.hh
M src/mem/cache/tags/sector_tags.cc
M src/mem/cache/tags/sector_tags.hh
7 files changed, 18 insertions(+), 21 deletions(-)

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



diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 48731cf..04e127d 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1141,7 +1141,7 @@

 // Access block in the tags
 Cycles tag_latency(0);
-blk = tags->accessBlock(pkt->getAddr(), pkt->isSecure(), tag_latency);
+blk = tags->accessBlock(pkt, tag_latency);

 DPRINTF(Cache, "%s for %s %s\n", __func__, pkt->print(),
 blk ? "hit " + blk->print() : "miss");
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index cc5dd99..77d6f9d 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -285,12 +285,11 @@
  * should only be used as such. Returns the tag lookup latency as a  
side

  * effect.
  *
- * @param addr The address to find.
- * @param is_secure True if the target memory space is secure.
+ * @param pkt The packet holding the address to find.
  * @param lat The latency of the tag lookup.
  * @return Pointer to the cache block if found.
  */
-virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles )  
= 0;

+virtual CacheBlk* accessBlock(const PacketPtr pkt, Cycles ) = 0;

 /**
  * Generate the tag from the given address.
diff --git a/src/mem/cache/tags/base_set_assoc.hh  
b/src/mem/cache/tags/base_set_assoc.hh

index 30592f1..dc749dd 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -117,14 +117,13 @@
  * should only be used as such. Returns the tag lookup latency as a  
side

  * effect.
  *
- * @param addr The address to find.
- * @param is_secure True if the target memory space is secure.
+ * @param pkt The packet holding the address to find.
  * @param lat The latency of the tag lookup.
  * @return Pointer to the cache block if found.
  */
-CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles ) override
+CacheBlk* accessBlock(const PacketPtr pkt, Cycles ) override
 {
-CacheBlk *blk = findBlock(addr, is_secure);
+CacheBlk *blk = findBlock(pkt->getAddr(), pkt->isSecure());

 // Access all tags in parallel, hence one in each way.  The data  
side
 // either accesses all blocks in parallel, or one block  
sequentially on

diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index 53d1246..5fea07e 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -128,17 +128,18 @@
 }

 CacheBlk*
-FALRU::accessBlock(Addr addr, bool is_secure, Cycles )
+FALRU::accessBlock(const PacketPtr pkt, Cycles )
 {
-return accessBlock(addr, is_secure, lat, 0);
+return accessBlock(pkt, lat, 0);
 }

 CacheBlk*
-FALRU::accessBlock(Addr addr, bool is_secure, Cycles ,
+FALRU::accessBlock(const PacketPtr pkt, Cycles ,
CachesMask *in_caches_mask)
 {
 CachesMask mask = 0;
-FALRUBlk* blk = static_cast(findBlock(addr, is_secure));
+FALRUBlk* blk =
+static_cast(findBlock(pkt->getAddr(), pkt->isSecure()));

 // If a cache hit
 if (blk && blk->isValid()) {
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 9e45a26..b96a1a0 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -173,19 +173,18 @@
  * cache access and should only be used as such.
  * Returns tag lookup latency and the inCachesMask flags as a side  
effect.

  *
- * @param addr The address to look for.
- * @param is_secure True if the target memory space is secure.
+ * @param pkt The packet holding the address to find.
  * @param lat The latency of the tag lookup.
  * @param in_cache_mask Mask indicating the caches in which the blk  
fits.

  * @return Pointer to the cache block.
  */
-CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles ,
+CacheBlk* accessBlock(const