Make perf.py changes work as part of alloy.py
This commit is contained in:
1
alloy.py
1
alloy.py
@@ -495,6 +495,7 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
|
||||
performance.ref = "ispc_ref"
|
||||
if current_OS == "Windows":
|
||||
performance.ref = "ispc_ref.exe"
|
||||
performance.perf_target = ""
|
||||
performance.in_file = "." + os.sep + f_date + os.sep + "performance.log"
|
||||
# prepare LLVM 3.3 as newest LLVM
|
||||
need_LLVM = check_LLVM(["3.3"])
|
||||
|
||||
9
perf.py
9
perf.py
@@ -392,7 +392,8 @@ def perf(options1, args):
|
||||
|
||||
print_debug("Okey go go go!\n\n", s, perf_log)
|
||||
# report command line
|
||||
print_debug("Command line: %s\n" % " ".join(map(str, sys.argv)), s, perf_log)
|
||||
if __name__ == "__main__":
|
||||
print_debug("Command line: %s\n" % " ".join(map(str, sys.argv)), s, perf_log)
|
||||
# report used ispc
|
||||
print_debug("Testing ispc: " + ispc_test + "\n", s, perf_log)
|
||||
|
||||
@@ -424,8 +425,8 @@ def perf(options1, args):
|
||||
command = command[:-1]
|
||||
# handle conditional target argument
|
||||
target_str = ""
|
||||
if options.target != "":
|
||||
target_str = " ISPC_IA_TARGETS="+options.target
|
||||
if options.perf_target != "":
|
||||
target_str = " ISPC_IA_TARGETS="+options.perf_target
|
||||
if is_windows == False:
|
||||
ex_command_ref = "./ref " + command + " >> " + perf_temp + "_ref"
|
||||
ex_command = "./test " + command + " >> " + perf_temp + "_test"
|
||||
@@ -510,7 +511,7 @@ if __name__ == "__main__":
|
||||
help='set reference compiler for compare', default="")
|
||||
parser.add_option('-f', '--file', dest='in_file',
|
||||
help='file to save perf output', default="")
|
||||
parser.add_option('-t', '--target', dest='target',
|
||||
parser.add_option('-t', '--target', dest='perf_target',
|
||||
help='set ispc target for building benchmarks (both test and ref)', default="")
|
||||
(options, args) = parser.parse_args()
|
||||
perf(options, args)
|
||||
|
||||
Reference in New Issue
Block a user