test(hipkernelprovider): Activate rocke python tests#9249
Draft
brockhargreaves-amd wants to merge 9 commits into
Draft
test(hipkernelprovider): Activate rocke python tests#9249brockhargreaves-amd wants to merge 9 commits into
brockhargreaves-amd wants to merge 9 commits into
Conversation
…th ctest Enable ROCKE_INSTALL_PYTHON_TESTS in provider mode (was explicitly OFF while artifact packaging was not yet wired) and install the full pytest suite into the test artifact alongside the existing smoke and golden gate scripts. Changes: - Remove `set(ROCKE_INSTALL_PYTHON_TESTS OFF)` from the provider CMakeLists.txt — TheRock's artifact-hipkernelprovider.toml now captures the Python files. - Add `install(DIRECTORY tests/ ...)` to stage the 31 pytest test files, conftest.py, pytest.ini, and __init__.py files. Excludes C/C++ parity emitters, the differential harness, and run_all.py (all build-time only). - Register a `rocke_pytest` ctest entry that invokes `python -m pytest` with PYTHONPATH set to the installed rocke package location. - Fix Windows compatibility: invoke Python test scripts via `python` command rather than executing .py files directly (shebangs don't work on Windows). - Fix test_rocke_ci_static.py examples path resolution to work in both the source tree (Python/rocke/examples/) and the installed layout (rocke/examples/). Tested locally: 398 passed, 0 failed, 30 skipped (with ROCM_PATH set). Co-Authored-By: Claude <noreply@anthropic.com>
REVERT BEFORE MERGING — therock-ref bumps are managed by rocm-libraries maintainers. This is a temporary override for CI testing of the rocKE pytest suite changes. Co-Authored-By: Claude <noreply@anthropic.com>
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
Pre-commit check failed⛔ pre-commit failed Please run locally:
This repo uses |
…RN clauses Multiple PATTERN clauses are valid CMake syntax for install(DIRECTORY). The signature explicitly allows repeating the pattern block: [[PATTERN <pattern> | REGEX <regex>] [EXCLUDE] [PERMISSIONS permissions...]] [...]) See: https://cmake.org/cmake/help/latest/command/install.html cmake-lint E1122 ("Duplicate keyword argument") does not account for this, so we suppress it inline around the pytest suite install command. Co-Authored-By: Claude <noreply@anthropic.com>
…RN clauses cmake-lint does not support re-enabling a suppressed diagnostic (no "enable" directive), so wrap the install() in a block() scope to contain the suppression. Co-Authored-By: Claude <noreply@anthropic.com>
|
🎉 All checks passed! This PR is ready for review. |
shumway
approved these changes
Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ISSUE ID : AICK-1517
The rocKE engine has a comprehensive Python test suite (tests covering DSL optimization, dispatch, instances, IR serialization, multiarch, and more) that currently only runs from the source tree. This PR wires the pytest suite into the installed test artifact and registers it with ctest so it runs alongside the existing hip-kernel-provider tests in CI.
Technical Details
Three files changed:
hip-kernel-provider/CMakeLists.txt
set(ROCKE_INSTALL_PYTHON_TESTS OFF)— this was explicitly disabling Python test installation in provider mode because the artifact packaging was not yet wired. TheRock'sartifact-hipkernelprovider.tomlnow captures the Python files (see companion PR: test(rocke): include artifacts necessary for testing rocKE TheRock#6412).rocke/platform/CMakeLists.txt
install(DIRECTORY tests/ ...)to stage the 31 pytest test files,conftest.py,pytest.ini, and__init__.pyfiles into the test artifact. Excludes C/C++ parity emitters (compiled againstrocke_coreat build time), the differential harness (needs compiler + source), andrun_all.py(dev-time runner).pythoncommand rather than executing.pyfiles directly (shebangs are not supported on Windows).rocke_pytestctest entry that invokespython -m pytestwithPYTHONPATHset to the installed rocke package location, soimport rockeresolves without the source-treesys.pathshims.rocke/platform/tests/test_rocke_ci_static.py
Python/rocke/examples/) and the installed layout (rocke/examples/). The installed layout does not have the intermediatePython/directory.Test Plan
THEROCK_FLAG_HIPKERNELPROVIDER_ENABLE_ROCKE=ONandBUILD_TESTING=ONbuild/ml-libs/hipkernelprovider/stage/bin/hip_kernel_provider/tests/ctestfrom the stage directory — existing rocke tests (rocke_ir_serialize_roundtrip,rocke_tiled_attention_2d_reentrancy,rocke_python_import_smoke,rocke_golden_static) all passpython -m pytest ./testsfrom the stage directory withPYTHONPATH=.andROCM_PATHsetTest Result
With
ROCM_PATHset (as CI'stest_hipkernelprovider.pyalready does):We will also need to wait on CI to ensure it passes.
Submission Checklist