Skip to content

Commit 52fb323

Browse files
DinoVmeta-codesync[bot]
authored andcommitted
include JIT runs in PGO generation
Summary: Currently we don't include the JIT in our PGO run for building CinderX. This does a 2nd run w/ the JIT enabled. Reviewed By: mpage Differential Revision: D109625263 fbshipit-source-id: d681221e1ef0f843431c8c8fc7c37db2b63632bb
1 parent d5e8d3f commit 52fb323

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ def print_section(title: str) -> None:
199199
"""
200200
import cinderx
201201
202-
import sys
203-
sys.argv.append("--pgo")
204-
205202
def main():
206203
# This import must not be in the module body as it will start the tests
207204
# running, and those using multiprocessing will fail because the initial
@@ -211,6 +208,7 @@ def main():
211208
if __name__ == "__main__":
212209
main()
213210
""",
211+
"--pgo",
214212
]
215213

216214
print(f"Running workload with PYTHONPATH={workload_env['PYTHONPATH']}")
@@ -220,6 +218,14 @@ def main():
220218
}
221219
if is_clang:
222220
workload_args["cwd"] = clang_pgo_dir
221+
222+
subprocess.run(workload_cmd, **workload_args)
223+
workload_env["CINDERX_JIT_ALL"] = "1"
224+
225+
# Not everything passes w/ the JIT but we still want the coverage
226+
workload_args["check"] = False
227+
# pickle crashes due to lack of recursion enforcement
228+
workload_cmd += ["-x", "test_pickle"]
223229
subprocess.run(workload_cmd, **workload_args)
224230

225231
if is_clang:

0 commit comments

Comments
 (0)