[GPU][test]: PA token type unit tests refactoring.#36327
Merged
pkowalc1 merged 10 commits intoJun 16, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors the existing Intel GPU PagedAttention unit tests into a reusable shared header and adds new unit tests covering the “token type ids” feature for page attention (including sliding-window mode), with expected outputs driven by dedicated test vectors.
Changes:
- Extracted the bulk of existing PagedAttention GPU test harness/reference code into
paged_attention_gpu_test.hppfor reuse/extensibility. - Added new parametrized GPU unit tests for token type ids, exercising both FlashAttn v2 enabled/disabled paths and sliding-window configuration.
- Introduced a dedicated token-type test data API header to serve precomputed Q/K/V and expected outputs.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/plugins/intel_gpu/tests/unit/test_utils/test_data/paged_attention_token_type_test_data.h |
Declares token-type test vectors API/structs used by the new unit tests. |
src/plugins/intel_gpu/tests/unit/test_cases/paged_attention_token_type_gpu_test.cpp |
Adds new parametrized GPU tests validating output against precomputed expected results for token type ids. |
src/plugins/intel_gpu/tests/unit/test_cases/paged_attention_gpu_test.hpp |
New shared test harness/header containing the refactored PA test logic used by multiple test TUs. |
src/plugins/intel_gpu/tests/unit/test_cases/paged_attention_gpu_test.cpp |
Simplifies the original PA test file to include the new shared header and keep existing instantiations. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
|
LGTM. Please check copilot review and make ci passed. |
wilson-seok
approved these changes
Jun 16, 2026
mryzhov
pushed a commit
to mryzhov/openvino
that referenced
this pull request
Jun 22, 2026
…6327) Added unit tests for page attention's token type feature. ### Details: - Refactored current PA unit tests to make it possible to extend for new unittests. - PA token type unittests are isolated from current ones(but derive as much as possible from standard PA tests) - PA original tests should not be affected in any way ### Tickets: - *CVS-188258* ### AI Assistance: - *AI assistance used: yes* - *Initial implementation was done by AI, but after that was seriously refactored.* --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Added unit tests for page attention's token type feature.
Details:
Tickets:
AI Assistance: