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

[xpupti] Add XCCL collective communication activity tracing to XPU plugin - #1396

Closed
tsocha wants to merge 16 commits into
pytorch:mainfrom
intel-staging:dev/tsocha/oneccl-3
Closed

tsocha wants to merge 16 commits into
pytorch:mainfrom
intel-staging:dev/tsocha/oneccl-3

Conversation

@tsocha

@tsocha tsocha commented May 11, 2026

Copy link
Copy Markdown
Contributor

It's a part of #1335 3/3

Enable PTI_VIEW_COMMUNICATION collection in the XPU PTI plugin so oneCCL host-side collective operations show up in Kineto traces. Events are emitted as COLLECTIVE_COMM activities named with an "xccl::" prefix and carry the PTI communicator id as metadata.

  • Gate new code paths on PTI_VERSION_AT_LEAST(0, 17)
  • Wire enable/disable of PTI_VIEW_COMMUNICATION in XpuptiActivityApi
  • Add handleCommunicationActivity for pti_view_record_comms records
  • Add unit tests covering naming, field mapping, and out-of-range drop
  • Document INTEL_LIBITTNOTIFY64 requirement in libkineto/README.md

Enable PTI_VIEW_COMMUNICATION collection in the XPU PTI plugin so oneCCL
host-side collective operations show up in Kineto traces. Events are
emitted as COLLECTIVE_COMM activities named with an "xccl::" prefix and
carry the PTI communicator id as metadata.

- Gate new code paths on PTI_VERSION_AT_LEAST(0, 17)
- Wire enable/disable of PTI_VIEW_COMMUNICATION in XpuptiActivityApi
- Add handleCommunicationActivity for pti_view_record_comms records
- Add unit tests covering naming, field mapping, and out-of-range drop
- Document INTEL_LIBITTNOTIFY64 requirement in libkineto/README.md
@meta-cla meta-cla Bot added the cla signed label May 11, 2026
@tsocha

tsocha commented May 11, 2026

Copy link
Copy Markdown
Contributor Author

@gujinghui please review it.

@tsocha
tsocha requested a review from gujinghui May 12, 2026 09:50
Comment thread libkineto/README.md Resolved
@tsocha
tsocha requested a review from scotts May 21, 2026 10:23
@gujinghui

Copy link
Copy Markdown

@scotts please help review this PR. Thanks.

@tsocha tsocha changed the title Add XCCL collective communication activity tracing to XPU plugin [xpupti] Add XCCL collective communication activity tracing to XPU plugin Jun 24, 2026
@gujinghui

Copy link
Copy Markdown

@scotts @divyanshk @ryanzhang22
Could you please help review this PR? I would appreciate it if it could be included in the next PyTorch release. Thanks.

@meta-codesync

meta-codesync Bot commented Jul 9, 2026

Copy link
Copy Markdown

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

@ryanzhang22

Copy link
Copy Markdown
Contributor

@tsocha ack on the responses. Can you take a look at the XPU CI failure before I lint and merge internally.

@pytorch-bot

pytorch-bot Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

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

@tsocha

tsocha commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@ryanzhang22

@tsocha ack on the responses. Can you take a look at the XPU CI failure before I lint and merge internally.

I have fixed issue on the CI.
I also made some fixes for Windows.
Some common tests use Linux specific code which break Windows build of tests.

@meta-codesync meta-codesync Bot closed this in a97543e Jul 14, 2026
@meta-codesync

meta-codesync Bot commented Jul 14, 2026

Copy link
Copy Markdown

@ryanzhang22 merged this pull request in a97543e.

@meta-codesync meta-codesync Bot added the Merged label Jul 14, 2026
@tsocha
tsocha deleted the dev/tsocha/oneccl-3 branch July 14, 2026 14:05
@tsocha
tsocha restored the dev/tsocha/oneccl-3 branch July 14, 2026 14:05
pytorchmergebot pushed a commit to pytorch/pytorch that referenced this pull request Jul 23, 2026
Includes the following commits:

- Add XPU toggleCollectionDynamic mechanism (pytorch/kineto#1410) cb29370
- Explicitly wrap NCCL strings in output json (pytorch/kineto#1482) d62c7f5
- emit GPU_USER_ANNOTATION for user record_function ranges (pytorch/kineto#1393) a8fd013
- Re-select test_basic_chrome_trace_cpu on XPU (pytorch/kineto#1484) f451dfc
- Fix CQS signal readability-avoid-const-params-in-decls in fbcode/kineto/libkineto (pytorch/kineto#1486) c4e1538
- Add NCCL collective metadata fields to the catalog (pytorch/kineto#1483) a31870c
- Add addTypedMetadata to GenericTraceActivity (pytorch/kineto#1485) 29ab453
- Centralize MetadataField definitions (pytorch/kineto#1481) 9c49dca
- Add XCCL collective communication activity tracing to XPU plugin (pytorch/kineto#1396) a97543e
- Fix CQS signal modernize-use-scoped-lock in fbcode/kineto/libkineto (pytorch/kineto#1480) e804b8f
- Un-deselect some profiler tests after fixing them (pytorch/kineto#1432) 446ac67
- Test controller async request arbitration (pytorch/kineto#1477) d579d88
- Annotation fixups (pytorch/kineto#1476) 994e6c5
Pull Request resolved: #190687
Approved by: https://github.com/Skylion007, https://github.com/scotts
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
Includes the following commits:

- Add XPU toggleCollectionDynamic mechanism (pytorch/kineto#1410) cb29370
- Explicitly wrap NCCL strings in output json (pytorch/kineto#1482) d62c7f5
- emit GPU_USER_ANNOTATION for user record_function ranges (pytorch/kineto#1393) a8fd013
- Re-select test_basic_chrome_trace_cpu on XPU (pytorch/kineto#1484) f451dfc
- Fix CQS signal readability-avoid-const-params-in-decls in fbcode/kineto/libkineto (pytorch/kineto#1486) c4e1538
- Add NCCL collective metadata fields to the catalog (pytorch/kineto#1483) a31870c
- Add addTypedMetadata to GenericTraceActivity (pytorch/kineto#1485) 29ab453
- Centralize MetadataField definitions (pytorch/kineto#1481) 9c49dca
- Add XCCL collective communication activity tracing to XPU plugin (pytorch/kineto#1396) a97543e
- Fix CQS signal modernize-use-scoped-lock in fbcode/kineto/libkineto (pytorch/kineto#1480) e804b8f
- Un-deselect some profiler tests after fixing them (pytorch/kineto#1432) 446ac67
- Test controller async request arbitration (pytorch/kineto#1477) d579d88
- Annotation fixups (pytorch/kineto#1476) 994e6c5
Pull Request resolved: pytorch#190687
Approved by: https://github.com/Skylion007, https://github.com/scotts
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
Includes the following commits:

- Add XPU toggleCollectionDynamic mechanism (pytorch/kineto#1410) cb29370
- Explicitly wrap NCCL strings in output json (pytorch/kineto#1482) d62c7f5
- emit GPU_USER_ANNOTATION for user record_function ranges (pytorch/kineto#1393) a8fd013
- Re-select test_basic_chrome_trace_cpu on XPU (pytorch/kineto#1484) f451dfc
- Fix CQS signal readability-avoid-const-params-in-decls in fbcode/kineto/libkineto (pytorch/kineto#1486) c4e1538
- Add NCCL collective metadata fields to the catalog (pytorch/kineto#1483) a31870c
- Add addTypedMetadata to GenericTraceActivity (pytorch/kineto#1485) 29ab453
- Centralize MetadataField definitions (pytorch/kineto#1481) 9c49dca
- Add XCCL collective communication activity tracing to XPU plugin (pytorch/kineto#1396) a97543e
- Fix CQS signal modernize-use-scoped-lock in fbcode/kineto/libkineto (pytorch/kineto#1480) e804b8f
- Un-deselect some profiler tests after fixing them (pytorch/kineto#1432) 446ac67
- Test controller async request arbitration (pytorch/kineto#1477) d579d88
- Annotation fixups (pytorch/kineto#1476) 994e6c5
Pull Request resolved: pytorch#190687
Approved by: https://github.com/Skylion007, https://github.com/scotts
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
Includes the following commits:

- Add XPU toggleCollectionDynamic mechanism (pytorch/kineto#1410) cb29370
- Explicitly wrap NCCL strings in output json (pytorch/kineto#1482) d62c7f5
- emit GPU_USER_ANNOTATION for user record_function ranges (pytorch/kineto#1393) a8fd013
- Re-select test_basic_chrome_trace_cpu on XPU (pytorch/kineto#1484) f451dfc
- Fix CQS signal readability-avoid-const-params-in-decls in fbcode/kineto/libkineto (pytorch/kineto#1486) c4e1538
- Add NCCL collective metadata fields to the catalog (pytorch/kineto#1483) a31870c
- Add addTypedMetadata to GenericTraceActivity (pytorch/kineto#1485) 29ab453
- Centralize MetadataField definitions (pytorch/kineto#1481) 9c49dca
- Add XCCL collective communication activity tracing to XPU plugin (pytorch/kineto#1396) a97543e
- Fix CQS signal modernize-use-scoped-lock in fbcode/kineto/libkineto (pytorch/kineto#1480) e804b8f
- Un-deselect some profiler tests after fixing them (pytorch/kineto#1432) 446ac67
- Test controller async request arbitration (pytorch/kineto#1477) d579d88
- Annotation fixups (pytorch/kineto#1476) 994e6c5
Pull Request resolved: pytorch#190687
Approved by: https://github.com/Skylion007, https://github.com/scotts
MelindaTan pushed a commit to MelindaTan/pytorch that referenced this pull request Jul 31, 2026
Includes the following commits:

- Add XPU toggleCollectionDynamic mechanism (pytorch/kineto#1410) cb29370
- Explicitly wrap NCCL strings in output json (pytorch/kineto#1482) d62c7f5
- emit GPU_USER_ANNOTATION for user record_function ranges (pytorch/kineto#1393) a8fd013
- Re-select test_basic_chrome_trace_cpu on XPU (pytorch/kineto#1484) f451dfc
- Fix CQS signal readability-avoid-const-params-in-decls in fbcode/kineto/libkineto (pytorch/kineto#1486) c4e1538
- Add NCCL collective metadata fields to the catalog (pytorch/kineto#1483) a31870c
- Add addTypedMetadata to GenericTraceActivity (pytorch/kineto#1485) 29ab453
- Centralize MetadataField definitions (pytorch/kineto#1481) 9c49dca
- Add XCCL collective communication activity tracing to XPU plugin (pytorch/kineto#1396) a97543e
- Fix CQS signal modernize-use-scoped-lock in fbcode/kineto/libkineto (pytorch/kineto#1480) e804b8f
- Un-deselect some profiler tests after fixing them (pytorch/kineto#1432) 446ac67
- Test controller async request arbitration (pytorch/kineto#1477) d579d88
- Annotation fixups (pytorch/kineto#1476) 994e6c5
Pull Request resolved: pytorch#190687
Approved by: https://github.com/Skylion007, https://github.com/scotts
@tsocha
tsocha deleted the dev/tsocha/oneccl-3 branch August 3, 2026 09:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants