Skip to content

PR #46486: [xla:gpu] Add a flag to configure the level of details in runtime trace annotation - #3611

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_957034022
Aug 3, 2026
Merged

PR #46486: [xla:gpu] Add a flag to configure the level of details in runtime trace annotation#3611
copybara-service[bot] merged 1 commit into
mainfrom
test_957034022

Conversation

@copybara-service

Copy link
Copy Markdown

PR #46486: [xla:gpu] Add a flag to configure the level of details in runtime trace annotation

Imported from GitHub PR openxla/xla#46486

This change adds runtime-configurable GPU trace annotation detail, with level 1 XLA emits a lot more details (at the cost of some overhead + larger traces) that allow to better analyze e2e performance.

  • Add --xla_gpu_trace_annotation_level:
    • Level 0 emits compact instruction names and basic structured payloads.
    • Level 1 adds detailed HLO and collective metadata.
  • Keep NVTX names compact while emitting structured Basic, Detailed, and Collective payloads.
  • Emit full parseable XProf annotation names containing operation metadata, source location, shape, replica groups, collective flags, and frontend attributes.
  • Allow ScopedAnnotation to use separate generators for the annotation stack and profiler range stack.
  • Rename the runtime API from kernel to instruction terminology, retaining GetKernelAnnotation as a deprecated compatibility shim.

Copybara import of the project:

--
6d2f18de8ea26d400b4438591dc336d48e553957 by Eugene Zhulenev ezhulenev@openxla.org:

[xla:gpu] Add a flag to configure the level of details in runtime trace annotation

Merging this change closes #46486

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#46486 from ezhulenev:trace-annotation-level 6d2f18de8ea26d400b4438591dc336d48e553957

…runtime trace annotation

Imported from GitHub PR openxla/xla#46486

This change adds runtime-configurable GPU trace annotation detail, with level 1 XLA emits a lot more details (at the cost of some overhead + larger traces) that allow to better analyze e2e performance.

  - Add `--xla_gpu_trace_annotation_level`:
      - Level 0 emits compact instruction names and basic structured payloads.
      - Level 1 adds detailed HLO and collective metadata.
  - Keep NVTX names compact while emitting structured Basic, Detailed, and Collective payloads.
  - Emit full parseable XProf annotation names containing operation metadata, source location, shape, replica groups, collective flags, and frontend attributes.
  - Allow ScopedAnnotation to use separate generators for the annotation stack and profiler range stack.
  - Rename the runtime API from kernel to instruction terminology, retaining GetKernelAnnotation as a deprecated compatibility shim.

Copybara import of the project:

--
6d2f18de8ea26d400b4438591dc336d48e553957 by Eugene Zhulenev <ezhulenev@openxla.org>:

[xla:gpu] Add a flag to configure the level of details in runtime trace annotation

Merging this change closes #46486

PiperOrigin-RevId: 958262733
@copybara-service
copybara-service Bot merged commit 8449c3e into main Aug 3, 2026
@copybara-service
copybara-service Bot deleted the test_957034022 branch August 3, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant