From c1b26191d05cd49630ea0ffd48e0a64c92c5bc7e Mon Sep 17 00:00:00 2001 From: Albert Zeyer Date: Fri, 6 Oct 2023 21:11:52 +0200 Subject: [PATCH] demo RF PT benchmark more --- demos/demo-rf-pt-benchmark.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demos/demo-rf-pt-benchmark.py b/demos/demo-rf-pt-benchmark.py index 86c87a56f4..a7adce0e94 100644 --- a/demos/demo-rf-pt-benchmark.py +++ b/demos/demo-rf-pt-benchmark.py @@ -493,8 +493,12 @@ def main(): arg_parser.add_argument("--bench-action", choices=("run", "multi-run", "profile"), default="run") args, remaining_args = arg_parser.parse_known_args() - # https://youtrack.jetbrains.com/issue/PY-63226/PyCharm-debugger-hangs-when-process-is-forking - multiprocessing.set_start_method("spawn") + try: + # https://youtrack.jetbrains.com/issue/PY-63226/PyCharm-debugger-hangs-when-process-is-forking + multiprocessing.set_start_method("spawn") + except Exception as exc: + print("multiprocessing.set_start_method 'spawn' exception:", exc) + print("Ignoring this...") if args.bench_action == "run": __main__.main(sys.argv[:1] + [_my_file] + remaining_args)