Skip to content

Commit

Permalink
Add the --mps_only option. (#1432)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #1432

Reviewed By: davidberard98

Differential Revision: D43587178

Pulled By: xuzhao9

fbshipit-source-id: d10ed14aca5a17ceea29ac680351120477fbcd41
  • Loading branch information
kulinseth authored and facebook-github-bot committed Feb 24, 2023
1 parent 4fb6838 commit 1635a74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def pytest_addoption(parser):
help="Run benchmarks on cpu only and ignore machine configuration checks")
parser.addoption("--cuda_only", action='store_true',
help="Run benchmarks on cuda only and ignore machine configuration checks")
parser.addoption("--mps_only", action='store_true',
help="Run benchmarks on mps only and ignore machine configuration checks")

def set_fuser(fuser):
if fuser == "te":
Expand Down
3 changes: 3 additions & 0 deletions test_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def pytest_generate_tests(metafunc):
if metafunc.config.option.cuda_only:
devices = ['cuda']

if metafunc.config.option.mps_only:
devices = ['mps']

if metafunc.cls and metafunc.cls.__name__ == "TestBenchNetwork":
paths = _list_model_paths()
metafunc.parametrize(
Expand Down

0 comments on commit 1635a74

Please sign in to comment.