diff --git a/run.py b/run.py index 3231cc7..5b8827e 100644 --- a/run.py +++ b/run.py @@ -7,10 +7,8 @@ import argparse import copy -import os import subprocess import sys -import tempfile from typing import List from tritonbench.operator_loader import load_opbench_by_name_from_loader @@ -36,6 +34,7 @@ def _run_in_task(op: str) -> None: copy_sys_argv = copy.deepcopy(sys.argv) copy_sys_argv = remove_cmd_parameter(copy_sys_argv, "--op") copy_sys_argv = remove_cmd_parameter(copy_sys_argv, "--isolate") + copy_sys_argv = remove_cmd_parameter(copy_sys_argv, "--op-collection") add_cmd_parameter(copy_sys_argv, "--op", op) op_task_cmd.extend(copy_sys_argv) try: @@ -117,6 +116,10 @@ def run(args: List[str] = []): else: ops = list_operators_by_collection(args.op_collection) + # Force isolation in subprocess if testing more than one op. + if len(ops) >= 2: + args.isolate = True + with gpu_lockdown(args.gpu_lockdown): for op in ops: args.op = op