Skip to content

Tests refactoring - #1

Merged
tzielinski-habana merged 1 commit into
xpu_rlfrom
xpu_rl_test_refactoring
May 27, 2026
Merged

tzielinski-habana merged 1 commit into
xpu_rlfrom
xpu_rl_test_refactoring

Conversation

@tzielinski-habana

Copy link
Copy Markdown
Owner

This pull request updates the determinism test suite to provide more accurate device-based test skipping and to improve coverage for both CUDA and XPU platforms. The changes standardize the use of new decorators for skipping tests depending on device support, add more granular skipping logic for XPU backends, and introduce a new test for RMS norm batch invariance.

Test skipping and device support improvements:

  • Replaced the old skip_unsupported and skip_unsupported_xpu decorators with the new skip_if_not_cuda, skip_if_not_xpu, and skip_unsupported_device decorators throughout the test files to more accurately reflect device requirements and improve test reliability across CUDA and XPU platforms. (tests/v1/determinism/test_batch_invariance.py, tests/v1/determinism/test_matmul_batch_invariant.py, tests/v1/determinism/test_nvfp4_batch_invariant.py, tests/v1/determinism/test_online_batch_invariance.py, tests/v1/determinism/test_rms_norm_batch_invariant.py, tests/v1/determinism/utils.py) [1] [2] [3] [4] [5] [6]

  • Added skip_unsupported_device decorator and XPU_BACKENDS list in utils.py, and updated batch invariance tests to skip unverified backends on XPU, ensuring only supported configurations are tested. (tests/v1/determinism/test_batch_invariance.py, tests/v1/determinism/utils.py) [1] [2] [3] [4] [5] [6]

Test coverage and new tests:

  • Added a new test test_rms_norm_batch_invariance to verify that RMS norm outputs are batch-invariant, improving coverage for this core property. (tests/v1/determinism/test_rms_norm_batch_invariant.py)

  • Updated all relevant test functions to use the new device-aware skipping logic, ensuring tests are only run on supported hardware and improving CI reliability. (tests/v1/determinism/test_matmul_batch_invariant.py, tests/v1/determinism/test_rms_norm_batch_invariant.py, tests/v1/determinism/test_nvfp4_batch_invariant.py, tests/v1/determinism/test_online_batch_invariance.py) [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

These changes make the test suite more robust and ensure that determinism tests are accurately targeted to the supported hardware backends.

Signed-off-by: tzielinski-habana <tomasz.zielinski@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tzielinski-habana
tzielinski-habana merged commit 4bf9342 into xpu_rl May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants