Skip to content

Add XPU PTI version to Metadata - #1491

Merged
ryanzhang22 merged 1 commit into
pytorch:mainfrom
intel-staging:dev/pawelswi/xpupti-version
Jul 29, 2026
Merged

Add XPU PTI version to Metadata#1491
ryanzhang22 merged 1 commit into
pytorch:mainfrom
intel-staging:dev/pawelswi/xpupti-version

Conversation

@PawelSwider2000

Copy link
Copy Markdown
Contributor

Add the Intel PTI version to XPU Kineto trace metadata as xpupti_version.

The XPU profiler session now obtains the runtime version through ptiVersionString() and emits it as a JSON string value. This lets exported traces identify the PTI version that produced them, aiding diagnosis of profiler behavior across Intel PTI versions.

Add a focused XPU PTI unit test confirming that the metadata field is present and non-empty.

@meta-cla meta-cla Bot added the cla signed label Jul 23, 2026
@PawelSwider2000

Copy link
Copy Markdown
Contributor Author

@ryanzhang22 Could you please take a look, I added xpupti_version in a bit different way than CUDA adds cuptiVersion:

addVersionMetadata("cupti_version", std::to_string(cuptiVersion));

However the XPU is a plugin and does not inherit from GenericActivityProfiler. Please suggest if to unify the way off adding version metadata for traces as unifying could make bigger changes in API. Thanks

@ryanzhang22

Copy link
Copy Markdown
Contributor

I think this seems fine. In the GenericActivityProfiler path addVersionMetadata eventually just flows to addMetadata anyways.

@meta-codesync

meta-codesync Bot commented Jul 29, 2026

Copy link
Copy Markdown

@ryanzhang22 has imported this pull request. If you are a Meta employee, you can view this in D114119112.

@ryanzhang22
ryanzhang22 merged commit e027765 into pytorch:main Jul 29, 2026
11 of 12 checks passed
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Aug 7, 2026
Includes the following commits:

- [XPUPTI] Disable XPUPTI if cpuOnly flag is true. (pytorch/kineto#1511) 15f4784
- Sanitize and escape labels and names for JSON output (pytorch/kineto#1508) 24d913c
- Enforce PyTorch's RAWTHROW and CMAKE linters in Kineto (pytorch/kineto#1513) 50db78d
- Add CPU-only end-to-end test for the on-demand async trace chain (pytorch/kineto#1507) 2f6cb94
- Migrate `-c fbcode.platform010_cuda_version` to the cuda constraint modifier 70e46d9
- Remove legacy code 76c6d9d
- Don't warn on the intentional fb "file" logger-factory override f11967c
- Make ConfigLoader poll-thread exception test deterministic and generic (pytorch/kineto#1501) fa09c88
- Add XPU PTI version to Metadata (pytorch/kineto#1491) e027765
- Fix ConfigLoaderTest daemon-poll failures in single-process runs (pytorch/kineto#1506) 0c7571a
Pull Request resolved: #192255
Approved by: https://github.com/ryanzhang22
ankitbhrdwj pushed a commit to ankitbhrdwj/pytorch that referenced this pull request Aug 12, 2026
Includes the following commits:

- [XPUPTI] Disable XPUPTI if cpuOnly flag is true. (pytorch/kineto#1511) 15f4784
- Sanitize and escape labels and names for JSON output (pytorch/kineto#1508) 24d913c
- Enforce PyTorch's RAWTHROW and CMAKE linters in Kineto (pytorch/kineto#1513) 50db78d
- Add CPU-only end-to-end test for the on-demand async trace chain (pytorch/kineto#1507) 2f6cb94
- Migrate `-c fbcode.platform010_cuda_version` to the cuda constraint modifier 70e46d9
- Remove legacy code 76c6d9d
- Don't warn on the intentional fb "file" logger-factory override f11967c
- Make ConfigLoader poll-thread exception test deterministic and generic (pytorch/kineto#1501) fa09c88
- Add XPU PTI version to Metadata (pytorch/kineto#1491) e027765
- Fix ConfigLoaderTest daemon-poll failures in single-process runs (pytorch/kineto#1506) 0c7571a
Pull Request resolved: pytorch#192255
Approved by: https://github.com/ryanzhang22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants