Files
TheRock/rocm-libraries/projects/hipblaslt/tensilelite/Tensile/Tests/unit/conftest.py
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

65 lines
2.7 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""pytest configuration and CLI options for store-D unit tests."""
import pytest
from streamk5_test_helpers import mock_streamk_writer # noqa: F401
@pytest.fixture(autouse=True)
def skip_parametrized_if_cli(request):
"""Skip all tests except test_storeD_cli when CLI options (--mn) are provided."""
if (request.config.getoption("--mn", default=None) is not None
and request.function.__name__ != "test_storeD_cli"):
pytest.skip("--mn specified: only test_storeD_cli runs")
def pytest_addoption(parser):
parser.addoption(
"--mn", nargs="+", metavar="M,N",
help="List of M,N pairs to test, e.g. --mn 23,17 32,32 16,16",
)
parser.addoption(
"--mt", nargs="+", metavar="MT0,MT1",
help="List of MacroTile pairs to test, e.g. --mt 16,16 32,32",
)
parser.addoption(
"--wave-config", nargs="+", metavar="WG0,WG1",
help="List of MIWaveGroup pairs to test, e.g. --wave-config 1,1 2,2",
)
parser.addoption(
"--dump-asm", action="store_true", default=False,
help="Dump generated assembly and store module text for each test case",
)
parser.addoption(
"--dump-store-insts", action="store_true", default=False,
help="Print only the buffer_store_* instructions emitted by the store-D path, "
"one per line with the preceding comment for context",
)
parser.addoption(
"--asm-output-dir", default=None, metavar="DIR",
help="Write the full assembled kernel source (.s file) for each CLI test case "
"to DIR/test_<label>.s for offline inspection",
)
parser.addoption(
"--print-ref", action="store_true", default=False,
help="Print the reference C matrix alongside the D output (only applies to "
"random init mode where a reference matrix is available)",
)
parser.addoption(
"--subtile-map", action="store_true", default=False,
help="Print one value per MMA subtile (0,0) instead of the full matrix — "
"useful for large tiles where the full print is unwieldy",
)
parser.addoption(
"--init-mode", default="matrix", choices=["matrix", "wave_id", "random"],
help="Accvgpr initialisation mode for the CLI test: "
"'matrix' (default) loads a full M×N host matrix; "
"'wave_id' writes float(wave_id) to every accvgpr (no verification); "
"'random' loads uniform random values in [-9, 9] per thread per accvgpr (no verification).",
)
parser.addoption(
"--dtype", default="fp32", choices=["fp32", "bf16"],
help="Output destination data type for the CLI test: "
"'fp32' (default) or 'bf16' (uses HighPrecisionAccumulate with bf16 conversion).",
)