From be3d14cf76f53bc1a0d04ee04e1660b3f63af4cb Mon Sep 17 00:00:00 2001 From: powderluv Date: Tue, 5 Jul 2022 00:05:36 -0700 Subject: [PATCH] Fix multi-threaded tests on macOS (#1005) Fixes https://github.com/llvm/torch-mlir/issues/994 --- python/torch_mlir_e2e_test/torchscript/framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/torch_mlir_e2e_test/torchscript/framework.py b/python/torch_mlir_e2e_test/torchscript/framework.py index d9ab1aad7..fdaa46084 100644 --- a/python/torch_mlir_e2e_test/torchscript/framework.py +++ b/python/torch_mlir_e2e_test/torchscript/framework.py @@ -321,7 +321,7 @@ def run_workers_in_parallel(task_queue: mp.Queue, worker): processes = [] for i in range(NUMBER_OF_PROCESSES): - p = mp.Process(target=worker, args=(task_queue, )) + p = mp.get_context("fork").Process(target=worker, args=(task_queue, )) p.start() processes.append(p) for i in range(NUMBER_OF_PROCESSES):