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

Clean up UI for pytest machine config #204

Merged
merged 2 commits into from
Jan 27, 2021
Merged
Changes from 1 commit
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
Next Next commit
Clean up UI for pytest machine config
- when exiting due to assertion, make the message more focused by
  avoiding pytests INTERNALERROR wrapper and whole stacktrace
- also add suggestion of available --ignore_machine_config override
  • Loading branch information
wconstab committed Jan 27, 2021
commit 08d72977c39e5decc1e40f5bb046e316c67b3a99
5 changes: 4 additions & 1 deletion conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ def set_fuser(fuser):
torch._C._jit_set_texpr_fuser_enabled(True)

def pytest_sessionstart(session):
if not session.config.getoption('ignore_machine_config'):
try:
check_machine_configured()
except AssertionError as e:
if not session.config.getoption('ignore_machine_config'):
pytest.exit(f"{e}\nUse --ignore_machine_config arg if not running with recommended tuning settings")

def pytest_configure(config):
set_fuser(config.getoption("fuser"))
Expand Down