Skip to content

Add fusion debug logging#39413

Closed
complexbulb wants to merge 2 commits intoopenxla:mainfrom
complexbulb:add-fusion-debug-logging
Closed

Add fusion debug logging#39413
complexbulb wants to merge 2 commits intoopenxla:mainfrom
complexbulb:add-fusion-debug-logging

Conversation

@complexbulb
Copy link
Copy Markdown
Contributor

📝 Summary of Changes
Added VLOG(2) debugging statements to xla/service/instruction_fusion.cc. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the ShouldFuse decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.

copybara-service Bot pushed a commit that referenced this pull request Mar 19, 2026
Imported from GitHub PR #39413

📝 Summary of Changes
Added `VLOG(2)` debugging statements to `xla/service/instruction_fusion.cc`. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the `ShouldFuse` decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.
Copybara import of the project:

--
0840683 by complexbulb <personal123888@googlemail.com>:

Add VLOG for root instruction fusion rejection

--
19bf0ac by complexbulb <personal123888@googlemail.com>:

Add VLOG debugging for fusion pass decisions

Merging this change closes #39413

FUTURE_COPYBARA_INTEGRATE_REVIEW=#39413 from complexbulb:add-fusion-debug-logging 19bf0ac
PiperOrigin-RevId: 886056117
copybara-service Bot pushed a commit to tensorflow/tensorflow that referenced this pull request Mar 19, 2026
Imported from GitHub PR openxla/xla#39413

📝 Summary of Changes
Added `VLOG(2)` debugging statements to `xla/service/instruction_fusion.cc`. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the `ShouldFuse` decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.
Copybara import of the project:

--
0840683c70bf90e85912d78942e98f9668d95524 by complexbulb <personal123888@googlemail.com>:

Add VLOG for root instruction fusion rejection

--
19bf0ac838b695157f9ff2f41bab7ba29bcd45b2 by complexbulb <personal123888@googlemail.com>:

Add VLOG debugging for fusion pass decisions

Merging this change closes #39413

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#39413 from complexbulb:add-fusion-debug-logging 19bf0ac838b695157f9ff2f41bab7ba29bcd45b2
PiperOrigin-RevId: 886056117
copybara-service Bot pushed a commit that referenced this pull request Mar 19, 2026
Imported from GitHub PR #39413

📝 Summary of Changes
Added `VLOG(2)` debugging statements to `xla/service/instruction_fusion.cc`. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the `ShouldFuse` decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.
Copybara import of the project:

--
0840683 by complexbulb <personal123888@googlemail.com>:

Add VLOG for root instruction fusion rejection

--
19bf0ac by complexbulb <personal123888@googlemail.com>:

Add VLOG debugging for fusion pass decisions

Merging this change closes #39413

FUTURE_COPYBARA_INTEGRATE_REVIEW=#39413 from complexbulb:add-fusion-debug-logging 19bf0ac
PiperOrigin-RevId: 886056117
copybara-service Bot pushed a commit to tensorflow/tensorflow that referenced this pull request Mar 19, 2026
Imported from GitHub PR openxla/xla#39413

📝 Summary of Changes
Added `VLOG(2)` debugging statements to `xla/service/instruction_fusion.cc`. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the `ShouldFuse` decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.
Copybara import of the project:

--
0840683c70bf90e85912d78942e98f9668d95524 by complexbulb <personal123888@googlemail.com>:

Add VLOG for root instruction fusion rejection

--
19bf0ac838b695157f9ff2f41bab7ba29bcd45b2 by complexbulb <personal123888@googlemail.com>:

Add VLOG debugging for fusion pass decisions

Merging this change closes #39413

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#39413 from complexbulb:add-fusion-debug-logging 19bf0ac838b695157f9ff2f41bab7ba29bcd45b2
PiperOrigin-RevId: 886056117
copybara-service Bot pushed a commit to tensorflow/tensorflow that referenced this pull request Mar 19, 2026
Imported from GitHub PR openxla/xla#39413

📝 Summary of Changes
Added `VLOG(2)` debugging statements to `xla/service/instruction_fusion.cc`. The logs explicitly output fusion rejections as well as the specific reason for rejection. The logs now surface the exact names of the producer and consumer instructions involved in the `ShouldFuse` decision.

🎯 Justification
This change improves debuggability and compiler observability. Previously, it was tedious to trace exactly why specific instructions in a large HLO graph were not fused. By gating this behind VLOG, developers can now trace exact fusion logic and graph decisions.

🚀 Kind of Contribution
✨ New Feature, ♻️ Cleanup

📊 Benchmark (for Performance Improvements)
N/A - This PR only introduces developer logging and does not affect compiler performance or execution speed.

🧪 Unit Tests:
No new unit tests were required as this does not change compilation semantics. Verified that existing tests pass cleanly:
Ran bazelisk test //xla/service:instruction_fusion_test
Verified log output manually.

🧪 Execution Tests:
N/A - This is a logging-only change and does not affect execution correctness or hardware backends.
Copybara import of the project:

--
0840683c70bf90e85912d78942e98f9668d95524 by complexbulb <personal123888@googlemail.com>:

Add VLOG for root instruction fusion rejection

--
19bf0ac838b695157f9ff2f41bab7ba29bcd45b2 by complexbulb <personal123888@googlemail.com>:

Add VLOG debugging for fusion pass decisions

Merging this change closes #39413

PiperOrigin-RevId: 886174965
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.

2 participants