Lines Matching +full:- +full:f
3 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
4 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
6 # SPDX-License-Identifier: BSD-2-Clause
24 ceed_magma_h = f"{script_dir}/../ceed-magma.h"
26 with open(ceed_magma_h, "r") as f:
27 data = f.read()
33 with open(ceed_magma_h, "w") as f:
34 f.write(data)
36 ceed_magma_gemm_selector_cpp = f"{script_dir}/../ceed-magma-gemm-selector.cpp"
41 with open(ceed_magma_gemm_selector_cpp, "r") as f:
42 data = f.read()
45 r"\1 " + f"{nb}",
47 with open(ceed_magma_gemm_selector_cpp, "w") as f:
48 f.write(data)
50 subprocess.run(build_cmd, cwd=f"{script_dir}/../../..")
51 subprocess.run(["make", "tuning", "OPT=-O0"], cwd=f"{script_dir}")
57 with open(log, "w") as f:
59 [f"{script_dir}/tuning", f"{backend}"], stdout=f, stderr=f)
78 "-arch",
82 "-max-nb",
87 "-build-cmd",
91 "-ceed",
101 f"{script_dir}/output-nb-{nb}.txt")
103 … f"Finished benchmarks for NB = {nb}, backend = {args.ceed} ({time.perf_counter() - start} s)")
123 with open(f"{script_dir}/{args.arch}_rtc.h", "w") as f:
124 f.write(
126 f.write(f"// auto-generated from data on {args.arch}\n\n")
130 f.write(
132 f.write(
133 f"std::vector<std::array<int, RECORD_LENGTH_RTC> > drtc_t_{args.arch}" +
137 f.write(" {" + re.sub(r"([0-9])(\s+)", r"\1,\2", row) +
138 ("},\n" if count < len(rows) - 1 else "}\n"))
140 f.write("};\n\n")
144 f.write(
146 f.write(
147 f"std::vector<std::array<int, RECORD_LENGTH_RTC> > drtc_n_{args.arch}" +
151 f.write(" {" + re.sub(r"([0-9])(\s+)", r"\1,\2", row) +
152 ("},\n" if count < len(rows) - 1 else "}\n"))
154 f.write("};\n")