allow x86 testing for native knl target; rename knc target to 'knc-generic'
This commit is contained in:
34
alloy.py
34
alloy.py
@@ -334,7 +334,7 @@ def check_targets():
|
||||
break
|
||||
# generate targets for KNC
|
||||
if current_OS == "Linux":
|
||||
answer_knc = ["knc"]
|
||||
answer_knc = ["knc-generic"]
|
||||
|
||||
if current_OS != "Windows":
|
||||
answer_generic = ["generic-4", "generic-16", "generic-8", "generic-1", "generic-32", "generic-64"]
|
||||
@@ -565,9 +565,12 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
||||
|
||||
if only_targets != "":
|
||||
only_targets += " "
|
||||
only_targets = only_targets.replace("generic "," generic-4 generic-16 ")
|
||||
only_targets_t = only_targets.split(" ")
|
||||
|
||||
if "generic" in only_targets_t:
|
||||
only_targets_t.append("generic-4")
|
||||
only_targets_t.append("generic-16")
|
||||
while "generic" in only_targets_t:
|
||||
only_targets_t.remove("generic")
|
||||
|
||||
for i in only_targets_t:
|
||||
if i == "":
|
||||
@@ -607,8 +610,6 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
||||
if len(LLVM) == 0:
|
||||
LLVM = [newest_LLVM, "trunk"]
|
||||
gen_archs = ["x86-64"]
|
||||
knc_archs = ["x86-64"]
|
||||
knl_archs = ["x86-64"]
|
||||
need_LLVM = check_LLVM(LLVM)
|
||||
for i in range(0,len(need_LLVM)):
|
||||
build_LLVM(need_LLVM[i], "", "", "", False, False, False, True, False, make, options.gcc_toolchain_path)
|
||||
@@ -635,16 +636,12 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
||||
# sometimes clang++ is not avaluable. if --ispc-build-compiler = gcc we will pass in g++ compiler
|
||||
if options.ispc_build_compiler == "gcc":
|
||||
stability.compiler_exe = "g++"
|
||||
# but 'knc/knl' target is supported only by icpc, so set explicitly
|
||||
if ("knc" in targets[j]) or ("knl-generic" in targets[j]):
|
||||
# but 'knc/knl' generic target is supported only by icpc, so set explicitly
|
||||
if ("knc-generic" in stability.target) or ("knl-generic" in stability.target):
|
||||
stability.compiler_exe = "icpc"
|
||||
# now set archs for targets
|
||||
if "generic" in targets[j]:
|
||||
if ("generic" in stability.target):
|
||||
arch = gen_archs
|
||||
elif "knc" in targets[j]:
|
||||
arch = knc_archs
|
||||
elif ("knl-generic" in targets[j]) or ("avx512knl-i32x16" in targets[j]):
|
||||
arch = knl_archs
|
||||
else:
|
||||
arch = archs
|
||||
for i1 in range(0,len(arch)):
|
||||
@@ -666,12 +663,11 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
||||
if (stability.target in unsupported_llvm_targets(LLVM[i])):
|
||||
print_debug("Warning: target " + stability.target + " is not supported in LLVM " + LLVM[i] + "\n", False, stability_log)
|
||||
continue
|
||||
|
||||
if ("knc-generic" in stability.target) or ("knl-generic" in stability.target):
|
||||
stability.compiler_exe = "icpc"
|
||||
stability.wrapexe = get_sde() + " " + sde_targets[j][0] + " -- "
|
||||
if "knc" in stability.target:
|
||||
arch = knc_archs
|
||||
elif ("knl-generic" in stability.target) or ("avx512knl-i32x16" in stability.target):
|
||||
arch = knl_archs
|
||||
if ("generic" in stability.target):
|
||||
arch = gen_archs
|
||||
else:
|
||||
arch = archs
|
||||
for i1 in range(0,len(arch)):
|
||||
@@ -928,7 +924,7 @@ if __name__ == '__main__':
|
||||
"Try to build compiler with all LLVM\n\talloy.py -r --only=build\n" +
|
||||
"Performance validation run with 10 runs of each test and comparing to branch 'old'\n\talloy.py -r --only=performance --compare-with=old --number=10\n" +
|
||||
"Validation run. Update fail_db.txt with new fails, send results to my@my.com\n\talloy.py -r --update-errors=F --notify='my@my.com'\n" +
|
||||
"Test KNC target (not tested when tested all supported targets, so should be set explicitly via --only-targets)\n\talloy.py -r --only='stability' --only-targets='knc'\n" +
|
||||
"Test KNC target (not tested when tested all supported targets, so should be set explicitly via --only-targets)\n\talloy.py -r --only='stability' --only-targets='knc-generic'\n" +
|
||||
"Test KNL target (requires sde)\n\talloy.py -r --only='stability' --only-targets='knl-generic avx512knl-i32x16'\n")
|
||||
|
||||
num_threads="%s" % multiprocessing.cpu_count()
|
||||
@@ -979,7 +975,7 @@ if __name__ == '__main__':
|
||||
run_group.add_option('--update-errors', dest='update',
|
||||
help='rewrite fail_db.txt file according to received results (F or FP)', default="")
|
||||
run_group.add_option('--only-targets', dest='only_targets',
|
||||
help='set list of targets to test. Possible values - all subnames of targets, plus "knc" for "generic" ' +
|
||||
help='set list of targets to test. Possible values - all subnames of targets, plus "knc-generic" for "generic" ' +
|
||||
'version of knc support, "knl-generic" or "avx512knl-i32x16" for "generic"/"native" knl support', default="")
|
||||
run_group.add_option('--time', dest='time',
|
||||
help='display time of testing', default=False, action='store_true')
|
||||
|
||||
63
fail_db.txt
63
fail_db.txt
@@ -166,22 +166,7 @@
|
||||
./tests/ptr-19.ispc runfail x86-64 generic-16 Linux LLVM 3.7 clang++3.4 -O0 *
|
||||
./tests/ptr-22.ispc runfail x86-64 generic-16 Linux LLVM 3.7 clang++3.4 -O0 *
|
||||
./tests/test-143.ispc runfail x86-64 generic-16 Linux LLVM 3.7 clang++3.4 -O0 *
|
||||
./tests/acos.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/asin.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/operators2.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/packed-store-1.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/packed-store2-1.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/short-circuit-14.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/short-circuit-15.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/acos.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/asin.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-14.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-15.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-5.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-6.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-7.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-8.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/short-circuit-9.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/acos.ispc runfail x86-64 avx512knl-i32x16 Mac LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/asin.ispc runfail x86-64 avx512knl-i32x16 Mac LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/operators2.ispc runfail x86-64 avx512knl-i32x16 Mac LLVM 3.7 clang++3.7 -O2 *
|
||||
@@ -215,3 +200,51 @@
|
||||
.\tests\short-circuit-7.ispc runfail x86-64 avx512knl-i32x16 Windows LLVM 3.7 cl -O0 *
|
||||
.\tests\short-circuit-8.ispc runfail x86-64 avx512knl-i32x16 Windows LLVM 3.7 cl -O0 *
|
||||
.\tests\short-circuit-9.ispc runfail x86-64 avx512knl-i32x16 Windows LLVM 3.7 cl -O0 *
|
||||
./tests/operators2.ispc runfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/rand-distrib.ispc runfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/shift-1.ispc runfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/foreach-active-5.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/idiv.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/int64-max-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/int64-max.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/int64-min-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/int64-min.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/pmuls_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/pmuls_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/pmulus_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/pmulus_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/rand-distrib-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/reduce-max-int64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/reduce-max-uint64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/reduce-min-int64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/reduce-min-uint64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/rotate.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/shuffle2-5.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/uint64-max-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/uint64-max.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/uint64-min-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/uint64-min.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/idiv.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/int64-max-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/int64-max.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/int64-min-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/int64-min.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/paddus_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/paddus_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/pmuls_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/pmuls_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/pmulus_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/pmulus_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/psubus_i64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/psubus_vi64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/reduce-max-int64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/reduce-max-uint64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/reduce-min-int64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/reduce-min-uint64.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/uint64-max-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/uint64-max.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/uint64-min-1.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/uint64-min.ispc compfail x86 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O0 *
|
||||
./tests/rand-distrib.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/shift-1.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
./tests/shuffle2-5.ispc runfail x86-64 avx512knl-i32x16 Linux LLVM 3.7 clang++3.7 -O2 *
|
||||
|
||||
20
run_tests.py
20
run_tests.py
@@ -162,7 +162,7 @@ def run_test(testname):
|
||||
# is this a test to make sure an error is issued?
|
||||
want_error = (filename.find("tests_errors") != -1)
|
||||
if want_error == True:
|
||||
if (options.target == "knc"):
|
||||
if (options.target == "knc-generic"):
|
||||
ispc_cmd = ispc_exe_rel + " --werror --nowrap %s --arch=%s --target=%s" % \
|
||||
(filename, options.arch, "generic-16")
|
||||
elif (options.target == "knl-generic"):
|
||||
@@ -264,7 +264,7 @@ def run_test(testname):
|
||||
and (options.include_file.find("knc-i1x16.h")!=-1 or options.include_file.find("knc.h")!=-1 or options.include_file.find("knc2x.h")!=-1):
|
||||
gcc_isa = '-mmic'
|
||||
|
||||
if (options.target == "knc"):
|
||||
if (options.target == "knc-generic"):
|
||||
cc_cmd = "%s -O2 -I. %s %s test_static.cpp -DTEST_SIG=%d %s -o %s" % \
|
||||
(options.compiler_exe, gcc_arch, "-mmic", match, obj_name, exe_name)
|
||||
elif (options.target == "knl-generic"):
|
||||
@@ -291,7 +291,7 @@ def run_test(testname):
|
||||
ispc_cmd = ispc_exe_rel + " --woff %s -o %s -O3 --arch=%s --target=%s" % \
|
||||
(filename, obj_name, options.arch, options.target)
|
||||
|
||||
if (options.target == "knc"):
|
||||
if (options.target == "knc-generic"):
|
||||
ispc_cmd = ispc_exe_rel + " --woff %s -o %s --arch=%s --target=%s" % \
|
||||
(filename, obj_name, options.arch, "generic-16")
|
||||
elif (options.target == "knl-generic"):
|
||||
@@ -558,7 +558,7 @@ def verify():
|
||||
"sse4-i8x16", "avx1-i32x4" "avx1-i32x8", "avx1-i32x16", "avx1-i64x4", "avx1.1-i32x8",
|
||||
"avx1.1-i32x16", "avx1.1-i64x4", "avx2-i32x8", "avx2-i32x16", "avx2-i64x4",
|
||||
"generic-1", "generic-4", "generic-8",
|
||||
"generic-16", "generic-32", "generic-64", "knc", "knl-generic", "avx512knl-i32x16"]]
|
||||
"generic-16", "generic-32", "generic-64", "knc-generic", "knl-generic", "avx512knl-i32x16"]]
|
||||
for i in range (0,len(f_lines)):
|
||||
if f_lines[i][0] == "%":
|
||||
continue
|
||||
@@ -634,7 +634,7 @@ def run_tests(options1, args, print_version):
|
||||
global is_generic_target
|
||||
is_generic_target = ((options.target.find("generic-") != -1 and
|
||||
options.target != "generic-1" and options.target != "generic-x1") or
|
||||
options.target == "knc" or options.target == "knl-generic")
|
||||
options.target == "knc-generic" or options.target == "knl-generic")
|
||||
|
||||
global is_nvptx_target
|
||||
is_nvptx_target = (options.target.find("nvptx") != -1)
|
||||
@@ -659,7 +659,7 @@ def run_tests(options1, args, print_version):
|
||||
error("No generics #include specified; using examples/intrinsics/generic-64.h\n", 2)
|
||||
options.include_file = "examples/intrinsics/generic-64.h"
|
||||
options.target = "generic-64"
|
||||
elif options.target == "knc":
|
||||
elif options.target == "knc-generic":
|
||||
error("No knc #include specified; using examples/intrinsics/knc.h\n", 2)
|
||||
options.include_file = "examples/intrinsics/knc.h"
|
||||
elif options.target == "knl-generic":
|
||||
@@ -667,7 +667,7 @@ def run_tests(options1, args, print_version):
|
||||
options.include_file = "examples/intrinsics/knl.h"
|
||||
|
||||
if options.compiler_exe == None:
|
||||
if (options.target == "knc"):
|
||||
if (options.target == "knc-generic"):
|
||||
options.compiler_exe = "icpc"
|
||||
elif (options.target == "knl-generic"):
|
||||
options.compiler_exe = "icpc"
|
||||
@@ -695,7 +695,7 @@ def run_tests(options1, args, print_version):
|
||||
ispc_root = "."
|
||||
|
||||
# checks the required environment otherwise prints an error message
|
||||
if (options.target == "knc"):
|
||||
if (options.target == "knc-generic"):
|
||||
options.wrapexe = "micnativeloadex"
|
||||
PATH_dir = string.split(os.getenv("PATH"), os.pathsep)
|
||||
wrapexe_exists = False
|
||||
@@ -716,7 +716,7 @@ def run_tests(options1, args, print_version):
|
||||
OS = "Linux"
|
||||
|
||||
if not (OS == 'Linux'):
|
||||
error ("knc target is supported only on Linux", 1)
|
||||
error ("knc-generic target is supported only on Linux", 1)
|
||||
# if no specific test files are specified, run all of the tests in tests/,
|
||||
# failing_tests/, and tests_errors/
|
||||
if len(args) == 0:
|
||||
@@ -910,7 +910,7 @@ if __name__ == "__main__":
|
||||
help=('Set compilation target (sse2-i32x4, sse2-i32x8, sse4-i32x4, sse4-i32x8, ' +
|
||||
'sse4-i16x8, sse4-i8x16, avx1-i32x8, avx1-i32x16, avx1.1-i32x8, avx1.1-i32x16, ' +
|
||||
'avx2-i32x8, avx2-i32x16, avx512knl-i32x16, generic-x1, generic-x4, generic-x8, generic-x16, ' +
|
||||
'generic-x32, generic-x64, knc, knl-generic)'), default="sse4")
|
||||
'generic-x32, generic-x64, knc-generic, knl-generic)'), default="sse4")
|
||||
parser.add_option('-a', '--arch', dest='arch',
|
||||
help='Set architecture (arm, x86, x86-64)',default="x86-64")
|
||||
parser.add_option("-c", "--compiler", dest="compiler_exe", help="C/C++ compiler binary to use to run tests",
|
||||
|
||||
Reference in New Issue
Block a user