Skip to content
This repository was archived by the owner on Sep 30, 2026. It is now read-only.

[xpupti] Guard v2 device records by PTI version - #1557

Merged
ryanzhang22 merged 1 commit into
pytorch:mainfrom
intel-staging:dev/adrianos/xpupti-engine-pti-guard
Sep 8, 2026
Merged

ryanzhang22 merged 1 commit into
pytorch:mainfrom
intel-staging:dev/adrianos/xpupti-engine-pti-guard

Conversation

@aostrowski-hbn

Copy link
Copy Markdown
Contributor

Why

The v2 device activity records (pti_view_record_kernel_v2, pti_view_record_memory_copy_v2,
pti_view_record_memory_fill_v2) only exist from PTI 0.18. #1555 started consuming them
unconditionally, so the plugin no longer compiles against an older PTI. The XPU n-1 build
images still ship PTI 0.17, so linux-jammy-xpu-n-1-py3.10 / build and
win-vs2022-xpu-n-1-py3 / build on pytorch/pytorch main fail with
'pti_view_record_kernel_v2' does not name a type.

How

Pick the record version with the PTI_VERSION_AT_LEAST macro the plugin already provides, and
fall back to the v1 records below PTI 0.18, where the hardware engine is then not reported. The
aliases move to namespace scope so the plugin tests build the same records the plugin consumes;
the tests asserting the engine metadata are compiled for PTI 0.18+ only.

The v2 kernel, memory-copy and memory-fill records appeared in PTI
0.18, so consuming them unconditionally broke the build against older
PTI, which some XPU build images still ship. Fall back to the v1
records there; the hardware engine those v2 records carry is then not
reported.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@meta-cla meta-cla Bot added the cla signed label Sep 7, 2026
@aostrowski-hbn

Copy link
Copy Markdown
Contributor Author

@pytorchbot label "ciflow/xpu"

@pytorch-bot

pytorch-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown

The ciflow label(s) ciflow/xpu will be added, but CI won't be triggered until the workflows are approved (scroll to the bottom of this page).

Please ping one of the reviewers if you do not have access to approve and run workflows.

@pytorch-bot

pytorch-bot Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@aostrowski-hbn

aostrowski-hbn commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor Author

@EikanWang @gujinghui @guangyey @jgong5 please review. Failure is unrelated (CUDA-specific, was already visible in #1556).

@chuanqi129
chuanqi129 marked this pull request as ready for review September 7, 2026 21:22
@aostrowski-hbn

Copy link
Copy Markdown
Contributor Author

@ryanzhang22 @scotts please review

@ryanzhang22
ryanzhang22 merged commit 84e5ca9 into pytorch:main Sep 8, 2026
11 of 12 checks passed
@aostrowski-hbn
aostrowski-hbn deleted the dev/adrianos/xpupti-engine-pti-guard branch September 8, 2026 20:38
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Sep 8, 2026
Includes the following commits:

- [xpupti] Guard v2 device records by PTI version (pytorch/kineto#1557) 84e5ca9

This unbreaks `linux-jammy-xpu-n-1-py3.10 / build` and `win-vs2022-xpu-n-1-py3 / build`, red on main since #196015: the `n-1` images ship PTI 0.17, which does not carry the v2 device activity records that update started consuming.

Pull Request resolved: #196325
Approved by: https://github.com/chuanqi129, https://github.com/ryanzhang22

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
BBBela pushed a commit to BBBela/pytorch that referenced this pull request Sep 9, 2026
Includes the following commits:

- [xpupti] Guard v2 device records by PTI version (pytorch/kineto#1557) 84e5ca9

This unbreaks `linux-jammy-xpu-n-1-py3.10 / build` and `win-vs2022-xpu-n-1-py3 / build`, red on main since pytorch#196015: the `n-1` images ship PTI 0.17, which does not carry the v2 device activity records that update started consuming.

Pull Request resolved: pytorch#196325
Approved by: https://github.com/chuanqi129, https://github.com/ryanzhang22

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants