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 <mattdsinclair@gmail.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -233,6 +233,7 @@ def define_constants(constants):
|
||||
|
||||
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 @@ def define_constants(constants):
|
||||
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 @@ def define_constants(constants):
|
||||
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,),
|
||||
|
||||
@@ -46,16 +46,25 @@ from testlib import *
|
||||
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 @@ for isa in valid_isas:
|
||||
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)
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ Test file for the util m5 exit assembly instruction.
|
||||
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 @@ static_progs = {
|
||||
}
|
||||
|
||||
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 @@ cpu_types = {
|
||||
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 @@ base_path = joinpath(config.bin_path, 'hello')
|
||||
|
||||
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 @@ def verify_config(isa, binary, operating_s, cpu, hosts):
|
||||
# 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])
|
||||
|
||||
@@ -35,7 +35,11 @@ gem5_verify_config(
|
||||
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 @@ gem5_verify_config(
|
||||
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
|
||||
),
|
||||
)
|
||||
|
||||
@@ -52,7 +52,7 @@ gem5_verify_config(
|
||||
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 @@ gem5_verify_config(
|
||||
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
|
||||
|
||||
@@ -39,8 +39,10 @@ gem5_verify_config(
|
||||
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 @@ gem5_verify_config(
|
||||
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,),
|
||||
)
|
||||
|
||||
@@ -59,5 +59,5 @@ gem5_verify_config(
|
||||
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,)
|
||||
)
|
||||
|
||||
@@ -31,7 +31,7 @@ import re
|
||||
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
|
||||
|
||||
@@ -60,7 +60,7 @@ def test_boot(cpu_type, num_cpus, boot_type, host):
|
||||
'--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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user