8000 Register fallback NVTX instruction titles and support compact XLA domain ranges. by copybara-service[bot] · Pull Request #3671 · google/tsl · GitHub
[go: up one dir, main page]

Skip to content

Register fallback NVTX instruction titles and support compact XLA domain ranges. - #3671

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1007265476
Open

copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1007265476

Conversation

@copybara-service
Copy link
Copy Markdown

Register fallback NVTX instruction titles and support compact XLA domain ranges.

GetInstructionAnnotation previously passed an unregistered std::string to ScopedAnnotation outside ScopedModuleAnnotations, preventing Nsight Systems --capture-range=nvtx from matching fallback thunk ranges. Also, pgo_nsys_converter.py used a greedy hlo_op=(.*)# regex that captured trailing ,unique_hlo_op_id=... metadata.

Add tsl::profiler::RangePush(ProfilerDomainHandle, StringHandle) and cache registered fallback handles in GetInstructionAnnotation. Add tsl::profiler::XlaProfilerDomain() and NvtxRangeFormat::kHloOpName (selected when XLA_GPU_NVTX_DOMAIN=XLA) to emit compact <hlo_op> NVTX titles in the XLA domain while keeping xprof_name() in Thunk:#...# format. Update pgo_nsys_converter.py to stop at , or # and accept XLA:<hlo_op> ranges.

…ain ranges.

`GetInstructionAnnotation` previously passed an unregistered `std::string` to `ScopedAnnotation` outside `ScopedModuleAnnotations`, preventing Nsight Systems `--capture-range=nvtx` from matching fallback thunk ranges. Also, `pgo_nsys_converter.py` used a greedy `hlo_op=(.*)#` regex that captured trailing `,unique_hlo_op_id=...` metadata.

Add `tsl::profiler::RangePush(ProfilerDomainHandle, StringHandle)` and cache registered fallback handles in `GetInstructionAnnotation`. Add `tsl::profiler::XlaProfilerDomain()` and `NvtxRangeFormat::kHloOpName` (selected when `XLA_GPU_NVTX_DOMAIN=XLA`) to emit compact `<hlo_op>` NVTX titles in the `XLA` domain while keeping `xprof_name()` in `Thunk:#...#` format. Update `pgo_nsys_converter.py` to stop at `,` or `#` and accept `XLA:<hlo_op>` ranges.

PiperOrigin-RevId: 1007265476
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

0