Skip to content

[GPU][test]: PA token type unit tests refactoring.#36327

Merged
pkowalc1 merged 10 commits into
openvinotoolkit:masterfrom
pkowalc1:pa_token_type_unit_tests_refactoring
Jun 16, 2026
Merged

[GPU][test]: PA token type unit tests refactoring.#36327
pkowalc1 merged 10 commits into
openvinotoolkit:masterfrom
pkowalc1:pa_token_type_unit_tests_refactoring

Conversation

@pkowalc1

@pkowalc1 pkowalc1 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

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:

AI Assistance:

  • AI assistance used: yes
  • Initial implementation was done by AI, but after that was seriously refactored.

@pkowalc1 pkowalc1 requested review from a team as code owners June 9, 2026 13:56
@pkowalc1 pkowalc1 added the WIP work in progress label Jun 9, 2026
@github-actions github-actions Bot added the category: GPU OpenVINO GPU plugin label Jun 9, 2026
@pkowalc1 pkowalc1 changed the title [WIP]: [test][gpu]: PA token ids unit tests refactoring. [WIP]: [test][gpu]: PA token type unit tests refactoring. Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.hpp for 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.

Comment thread src/plugins/intel_gpu/tests/unit/test_cases/paged_attention_gpu_test.hpp Outdated
@pkowalc1 pkowalc1 changed the title [WIP]: [test][gpu]: PA token type unit tests refactoring. [test][gpu]: PA token type unit tests refactoring. Jun 11, 2026
@pkowalc1 pkowalc1 changed the title [test][gpu]: PA token type unit tests refactoring. [GPU][test]: PA token type unit tests refactoring. Jun 11, 2026
@pkowalc1 pkowalc1 removed the WIP work in progress label Jun 11, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@wilson-seok

Copy link
Copy Markdown
Contributor

LGTM. Please check copilot review and make ci passed.

@pkowalc1 pkowalc1 added this pull request to the merge queue Jun 16, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 16, 2026
@pkowalc1 pkowalc1 added this pull request to the merge queue Jun 16, 2026
Merged via the queue into openvinotoolkit:master with commit 1cb9fd3 Jun 16, 2026
188 checks passed
@pkowalc1 pkowalc1 deleted the pa_token_type_unit_tests_refactoring branch June 16, 2026 12:33
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: GPU OpenVINO GPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants