Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
name: self-hosted-amd
# Format: [Nightly-]ROCm-<major>.<minor>[.<patch>]. E.g., "ROCm-6.4" or "Nightly-ROCm-7.0".
# Use "Nightly-" prefix to use torch nightly builds.
toolkit: Nightly-ROCm-7.0
toolkit: ROCm-6.3
- tags: [macos-latest]
name: macos-latest
toolkit: Metal # or Nightly-Metal
Expand Down Expand Up @@ -352,8 +352,6 @@ jobs:
- name: Run ROCm tests with Python ${{ matrix.python-version }} (${{ matrix.runner.toolkit }})
id: rocm-tests
if: contains(matrix.runner.toolkit, 'ROCm')
# FIXME: ROCm test incorrectly skips tests
continue-on-error: true
run: |
cd testing
PYTEST=(
Expand All @@ -362,7 +360,6 @@ jobs:
)
"${PYTEST[@]}" --maxfail=3 --numprocesses=4 \
./python/amd/test_tilelang_test_amd.py
echo "::error::ROCm tests are known to be skipped incorrectly due to ROCm TVM build issues." >&2

# Apple Metal tests
- name: Run Metal tests with Python ${{ matrix.python-version }} (${{ matrix.runner.toolkit }})
Expand Down
24 changes: 24 additions & 0 deletions examples/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import random
import pytest

os.environ["PYTHONHASHSEED"] = "0"

Expand All @@ -18,3 +19,26 @@
pass
else:
np.random.seed(0)


def pytest_terminal_summary(terminalreporter, exitstatus, config):
"""Ensure that at least one test is collected. Error out if all tests are skipped."""
known_types = {
"failed",
"passed",
"skipped",
"deselected",
"xfailed",
"xpassed",
"warnings",
"error",
}
if (sum(
len(terminalreporter.stats.get(k, []))
for k in known_types.difference({"skipped", "deselected"})) == 0):
terminalreporter.write_sep(
"!",
(f"Error: No tests were collected. "
f"{dict(sorted((k, len(v)) for k, v in terminalreporter.stats.items()))}"),
)
pytest.exit("No tests were collected.", returncode=5)
24 changes: 24 additions & 0 deletions testing/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import random
import pytest

os.environ["PYTHONHASHSEED"] = "0"

Expand All @@ -18,3 +19,26 @@
pass
else:
np.random.seed(0)


def pytest_terminal_summary(terminalreporter, exitstatus, config):
"""Ensure that at least one test is collected. Error out if all tests are skipped."""
known_types = {
"failed",
"passed",
"skipped",
"deselected",
"xfailed",
"xpassed",
"warnings",
"error",
}
if (sum(
len(terminalreporter.stats.get(k, []))
for k in known_types.difference({"skipped", "deselected"})) == 0):
terminalreporter.write_sep(
"!",
(f"Error: No tests were collected. "
f"{dict(sorted((k, len(v)) for k, v in terminalreporter.stats.items()))}"),
)
pytest.exit("No tests were collected.", returncode=5)