Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[op_collection] Force --isolate mode when running multiple ops #118

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
Loading