def run_tapenade(func, num_params, functions, params_filename, output_filename,
                 runnable_filename):
    if sys.platform.startswith('win'):
        print("running....")
        run_command = "\"utils/program.exe\" " + \
            str(num_params) + " " + \
            str(len(func[1])) + " " + params_filename + " " + output_filename
    else:
        run_command = runnable_filename + " " + \
            str(num_params) + " " + \
            str(len(func[1])) + " " + params_filename + " " + output_filename
    print(run_command)
    run(run_command,
        stdout=PIPE,
        stderr=PIPE,
        universal_newlines=True,
        shell=True)
    return general_utils.parse_output(output_filename)
Beispiel #2
0
def run_enoki():
    cmd = "./tests/utils/enoki ./tests/utils/enoki_output.txt"
    os.system(cmd)
    return general_utils.parse_output("./tests/utils/enoki_output.txt")
Beispiel #3
0
def run_pytorch():
    cmd = "python3 " + "./tests/utils/pytorch.py" + " > " + "./tests/utils/pytorch_output.txt"
    os.system(cmd)
    return general_utils.parse_output("./tests/utils/pytorch_output.txt")