Bobby R. Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/38279 )
Change subject: tests,arch-gcn3,arch-x86: Changed X86 testlib tests to
GCN3_X86
......................................................................
tests,arch-gcn3,arch-x86: Changed X86 testlib tests to GCN3_X86
In an effort to get better test coverage, we've changed all X86 tests to
use GCN3_X86. This will, as a minimum, ensure that GCN3 is regularly
compiled. GCN3_X86 is a superset of X86 and all X86 tests should pass on
GCN3_X86.
Change-Id: I2684edfc4e48c3e311a400231293a9e04c701130
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38279
Reviewed-by: Matt Sinclair <mattdsincl...@gmail.com>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M ext/testlib/configuration.py
M tests/gem5/cpu_tests/test.py
M tests/gem5/hello_se/test_hello_se.py
M tests/gem5/learning_gem5/part1_test.py
M tests/gem5/learning_gem5/part2_test.py
M tests/gem5/learning_gem5/part3_test.py
M tests/gem5/m5_util/test_exit.py
M tests/gem5/test_build/test_build.py
M tests/gem5/x86-boot-tests/test_linux_boot.py
9 files changed, 56 insertions(+), 36 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Matt Sinclair: Looks good to me, but someone else must approve
kokoro: Regressions pass
diff --git a/ext/testlib/configuration.py b/ext/testlib/configuration.py
index c9c10ea..e5b7598 100644
--- a/ext/testlib/configuration.py
+++ b/ext/testlib/configuration.py
@@ -233,6 +233,7 @@
constants.isa_tag_type = 'isa'
constants.x86_tag = 'X86'
+ constants.gcn3_x86_tag = 'GCN3_X86'
constants.sparc_tag = 'SPARC'
constants.riscv_tag = 'RISCV'
constants.arm_tag = 'ARM'
@@ -256,6 +257,7 @@
constants.supported_tags = {
constants.isa_tag_type : (
constants.x86_tag,
+ constants.gcn3_x86_tag,
constants.sparc_tag,
constants.riscv_tag,
constants.arm_tag,
@@ -283,6 +285,7 @@
constants.target_host = {
constants.arm_tag : (constants.host_arm_tag,),
constants.x86_tag : (constants.host_x86_64_tag,),
+ constants.gcn3_x86_tag : (constants.host_x86_64_tag,),
constants.sparc_tag : (constants.host_x86_64_tag,),
constants.riscv_tag : (constants.host_x86_64_tag,),
constants.mips_tag : (constants.host_x86_64_tag,),
diff --git a/tests/gem5/cpu_tests/test.py b/tests/gem5/cpu_tests/test.py
index 33a9c12..393ff26 100644
--- a/tests/gem5/cpu_tests/test.py
+++ b/tests/gem5/cpu_tests/test.py
@@ -46,16 +46,25 @@
workloads = ('Bubblesort','FloatMM')
valid_isas = {
- constants.x86_tag :
('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'),
+ constants.gcn3_x86_tag :
+ ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'),
constants.arm_tag:
('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
constants.riscv_tag:
('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
}
+
base_path = joinpath(config.bin_path, 'cpu_tests')
base_url = config.resource_url + '/gem5/cpu_tests/benchmarks/bin/'
+
+isa_url = {
+ constants.gcn3_x86_tag : base_url + "x86"
+ constants.arm_tag : base_url + "arm"
+ constants.riscv_tag : base_url + "riscv"
+}
+
for isa in valid_isas:
path = joinpath(base_path, isa.lower())
for workload in workloads:
@@ -64,7 +73,7 @@
verifier.MatchStdout(ref_path),
)
- url = base_url + isa.lower() + '/' + workload
+ url = isa_url[isa] + '/' + workload
workload_binary = DownloadedProgram(url, path, workload)
binary = joinpath(workload_binary.path, workload)
diff --git a/tests/gem5/hello_se/test_hello_se.py
b/tests/gem5/hello_se/test_hello_se.py
index 5ebdd0c..77fd18f 100644
--- a/tests/gem5/hello_se/test_hello_se.py
+++ b/tests/gem5/hello_se/test_hello_se.py
@@ -45,7 +45,7 @@
from testlib import *
static_progs = {
- constants.x86_tag : ('hello64-static', 'hello32-static'),
+ constants.gcn3_x86_tag : ('hello64-static', 'hello32-static'),
constants.arm_tag : ('hello64-static', 'hello32-static'),
constants.mips_tag : ('hello',),
constants.riscv_tag : ('hello',),
@@ -53,11 +53,12 @@
}
dynamic_progs = {
- constants.x86_tag : ('hello64-dynamic',)
+ constants.gcn3_x86_tag : ('hello64-dynamic',)
}
cpu_types = {
- constants.x86_tag :
('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ constants.gcn3_x86_tag :
+ ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
constants.arm_tag :
('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'),
constants.mips_tag :
('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
constants.riscv_tag :
@@ -65,18 +66,10 @@
constants.sparc_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU')
}
-supported_os = {
- constants.x86_tag : ('linux',),
- constants.arm_tag : ('linux',),
- constants.mips_tag : ('linux',),
- constants.riscv_tag : ('linux',),
- constants.sparc_tag : ('linux',)
-}
-
# We only want to test x86, arm, and riscv on quick. Mips and sparc will be
# left for long.
os_length = {
- constants.x86_tag : constants.quick_tag,
+ constants.gcn3_x86_tag : constants.quick_tag,
constants.arm_tag : constants.quick_tag,
constants.mips_tag : constants.long_tag,
constants.riscv_tag : constants.quick_tag,
@@ -87,18 +80,26 @@
urlbase = config.resource_url + '/test-progs/hello/bin/'
+isa_urls = {
+ constants.gcn3_x86_tag : urlbase + "x86/linux",
+ constants.arm_tag : urlbase + "arm/linux",
+ constants.mips_tag : urlbase + "mips/linux",
+ constants.riscv_tag : urlbase + "riscv/linux",
+ constants.sparc_tag : urlbase + "sparc/linux",
+}
+
ref_path = joinpath(getcwd(), 'ref')
verifiers = (
verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
)
-def verify_config(isa, binary, operating_s, cpu, hosts):
- url = urlbase + isa.lower() + '/' + operating_s + '/' + binary
- path = joinpath(base_path, isa.lower(), operating_s)
+def verify_config(isa, binary, cpu, hosts):
+ url = isa_urls[isa] + '/' + binary
+ path = joinpath(base_path, isa.lower())
hello_program = DownloadedProgram(url, path, binary)
gem5_verify_config(
- name='test-' + binary + '-' + operating_s + "-" + cpu,
+ name='test-' + binary + '-' + cpu,
fixtures=(hello_program,),
verifiers=verifiers,
config=joinpath(config.base_dir, 'configs', 'example','se.py'),
@@ -112,15 +113,11 @@
# Run statically linked hello worlds
for isa in static_progs:
for binary in static_progs[isa]:
- for operating_s in supported_os[isa]:
- for cpu in cpu_types[isa]:
- verify_config(isa, binary, operating_s, cpu,
- constants.supported_hosts)
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, cpu, constants.supported_hosts)
# Run dynamically linked hello worlds
for isa in dynamic_progs:
for binary in dynamic_progs[isa]:
- for operating_s in supported_os[isa]:
- for cpu in cpu_types[isa]:
- verify_config(isa, binary, operating_s, cpu,
- constants.target_host[isa])
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, cpu, constants.target_host[isa])
diff --git a/tests/gem5/learning_gem5/part1_test.py
b/tests/gem5/learning_gem5/part1_test.py
index 4ca8442..4153165 100644
--- a/tests/gem5/learning_gem5/part1_test.py
+++ b/tests/gem5/learning_gem5/part1_test.py
@@ -35,7 +35,11 @@
config=joinpath(config_path, 'simple.py'),
config_args = [],
length = constants.quick_tag,
- valid_isas=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
+ valid_isas=(
+ constants.gcn3_x86_tag,
+ constants.riscv_tag,
+ constants.arm_tag,
+ ),
)
# The "quick" two level tests.
@@ -45,5 +49,9 @@
config=joinpath(config_path, 'two_level.py'),
config_args = [],
length = constants.quick_tag,
- valid_isas=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
+ valid_isas=(
+ constants.gcn3_x86_tag,
+ constants.riscv_tag,
+ constants.arm_tag
+ ),
)
diff --git a/tests/gem5/learning_gem5/part2_test.py
b/tests/gem5/learning_gem5/part2_test.py
index d487f80..24d623c 100644
--- a/tests/gem5/learning_gem5/part2_test.py
+++ b/tests/gem5/learning_gem5/part2_test.py
@@ -52,7 +52,7 @@
config=joinpath(config_path, 'simple_memobj.py'),
config_args = [],
# note: by default the above script uses x86
- valid_isas=(constants.x86_tag,),
+ valid_isas=(constants.gcn3_x86_tag,),
)
gem5_verify_config(
@@ -61,7 +61,7 @@
config=joinpath(config_path, 'simple_cache.py'),
config_args = [],
# note: by default the above script uses x86
- valid_isas=(constants.x86_tag,),
+ valid_isas=(constants.gcn3_x86_tag,),
)
# Note: for simple memobj and simple cache I want to use the traffic
generator
diff --git a/tests/gem5/learning_gem5/part3_test.py
b/tests/gem5/learning_gem5/part3_test.py
index e8ca351..eb758af 100644
--- a/tests/gem5/learning_gem5/part3_test.py
+++ b/tests/gem5/learning_gem5/part3_test.py
@@ -39,8 +39,10 @@
config=joinpath(config_path, 'simple_ruby.py'),
config_args = [],
protocol = 'MSI',
- valid_isas=(constants.x86_tag,), # Currently only x86 has the threads
test
- valid_hosts=constants.target_host[constants.x86_tag], # dynamically
linked
+ # Currently only x86 has the threads test
+ valid_isas=(constants.gcn3_x86_tag,),
+ # dynamically linked
+ valid_hosts=constants.target_host[constants.gcn3_x86_tag],
)
gem5_verify_config(
@@ -49,5 +51,6 @@
config=joinpath(config_path, 'ruby_test.py'),
config_args = [],
protocol = 'MSI',
- valid_isas=(constants.x86_tag,), # Currently only x86 has the threads
test
+ # Currently only x86 has the threads test
+ valid_isas=(constants.gcn3_x86_tag,),
)
diff --git a/tests/gem5/m5_util/test_exit.py
b/tests/gem5/m5_util/test_exit.py
index ff900b8..1bc6e6f 100644
--- a/tests/gem5/m5_util/test_exit.py
+++ b/tests/gem5/m5_util/test_exit.py
@@ -59,5 +59,5 @@
fixtures=(test_program,),
config=os.path.join(config.base_dir, 'configs', 'example','se.py'),
config_args=['--cmd', joinpath(test_program.path, filename)],
- valid_isas=(constants.x86_tag,)
+ valid_isas=(constants.gcn3_x86_tag,)
)
diff --git a/tests/gem5/test_build/test_build.py
b/tests/gem5/test_build/test_build.py
index 07d8035..3a6a534 100644
--- a/tests/gem5/test_build/test_build.py
+++ b/tests/gem5/test_build/test_build.py
@@ -31,7 +31,7 @@
import os
from testlib import *
-common_isas = [constants.x86_tag, constants.arm_tag, constants.riscv_tag]
+common_isas = [constants.gcn3_x86_tag, constants.arm_tag,
constants.riscv_tag]
for isa in constants.supported_isas:
if isa is constants.null_tag: continue
diff --git a/tests/gem5/x86-boot-tests/test_linux_boot.py
b/tests/gem5/x86-boot-tests/test_linux_boot.py
index 5422425..62f82f9 100644
--- a/tests/gem5/x86-boot-tests/test_linux_boot.py
+++ b/tests/gem5/x86-boot-tests/test_linux_boot.py
@@ -60,7 +60,7 @@
'--num-cpus', num_cpus,
'--boot-type', boot_type,
],
- valid_isas = (constants.x86_tag,),
+ valid_isas = (constants.gcn3_x86_tag,),
valid_hosts = host,
length = constants.long_tag,
)
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38279
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: I2684edfc4e48c3e311a400231293a9e04c701130
Gerrit-Change-Number: 38279
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Kyle Roarty <kyleroarty1...@gmail.com>
Gerrit-Reviewer: Matt Sinclair <mattdsincl...@gmail.com>
Gerrit-Reviewer: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s