Skip to content

Commit

Permalink
Fix Issue #1734 (#1735)
Browse files Browse the repository at this point in the history
Closes Issue #1734
  • Loading branch information
Priya2698 authored Feb 7, 2024
1 parent 2123f16 commit e972d92
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions python_benchmarks/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ def pytest_collection_modifyitems(session, config, items):
for item in items:
# If the benchmark has compile=False parameter (eager mode), skip it.
if (
"compile" in item.callspec.params
hasattr(item, "callspec")
and "compile" in item.callspec.params
and not item.callspec.params["compile"]
):
item.add_marker(skip_eager)
Expand All @@ -69,5 +70,9 @@ def pytest_collection_modifyitems(session, config, items):
)
for item in items:
# If the benchmark has compile=True parameter (torch.compile mode), skip it.
if "compile" in item.callspec.params and item.callspec.params["compile"]:
if (
hasattr(item, "callspec")
and "compile" in item.callspec.params
and item.callspec.params["compile"]
):
item.add_marker(skip_torchcompile)

0 comments on commit e972d92

Please sign in to comment.