Skip to content

Commit

Permalink
Fix remove params
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Nov 20, 2024
1 parent f030634 commit 71fc127
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tritonbench/utils/parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import argparse
from typing import List
from typing import List, Optional

from tritonbench.utils.env_utils import AVAILABLE_PRECISIONS
from tritonbench.utils.triton_op import DEFAULT_RUN_ITERS, DEFAULT_WARMUP, IS_FBCODE
Expand Down Expand Up @@ -201,9 +201,10 @@ def _remove_params(params, loc):
return params[:loc] + params[loc + 2 :]


def add_cmd_parameter(args: List[str], name: str, value: str) -> List[str]:
def add_cmd_parameter(args: List[str], name: str, value: Optional[str]=None) -> List[str]:
args.append(name)
args.append(value)
if value:
args.append(value)
return args


Expand Down

0 comments on commit 71fc127

Please sign in to comment.