Skip to content

Commit

Permalink
Change localrun to cpu_only and mention specifying this option will a…
Browse files Browse the repository at this point in the history
…utomatically ignore the machine config check.
  • Loading branch information
qxy11 committed Mar 17, 2021
1 parent 504a184 commit 4a2a59a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Some useful options include
- `--benchmark-autosave` (or other save related flags) to get .json output
- `-k <filter expression>` (standard pytest filtering)
- `--collect-only` only show what tests would run, useful to see what models there are or debug your filter expression
- `--localrun` if running on a CPU machine
- `--cpu_only` if running on a local CPU machine and ignoring machine configuration checks

## Nightly CI runs
Currently, models run on nightly pytorch builds and push data to scuba.
Expand Down
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def pytest_addoption(parser):
parser.addoption("--check_opt_vs_noopt_jit",
action='store_true',
help="The best attempt to check results for inference runs. Not all models support this!")
parser.addoption("--localrun", action='store_true',
help="Run benchmarks locally on a macbook")
parser.addoption("--cpu_only", action='store_true',
help="Run benchmarks on cpu only and ignore machine configuration checks")

def set_fuser(fuser):
if fuser == "old":
Expand Down
2 changes: 1 addition & 1 deletion test_bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def pytest_generate_tests(metafunc):
# This is where the list of models to test can be configured
# e.g. by using info in metafunc.config
devices = ['cpu', 'cuda']
if metafunc.config.option.localrun:
if metafunc.config.option.cpu_only:
devices = ['cpu']
all_models = list_models()
if metafunc.cls and metafunc.cls.__name__ == "TestBenchNetwork":
Expand Down

0 comments on commit 4a2a59a

Please sign in to comment.