Repository navigation
PR #45596: [XLA:GPU] Support VA remapping of output buffer allocations - #123613
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
exported_pr_950641350
branch
2 times, most recently
from
July 20, 2026 09:46
88af485 to
36bd2ec
Compare
Reverts 1b96579 PiperOrigin-RevId: 951414818
copybara-service
Bot
force-pushed
the
exported_pr_950641350
branch
from
July 21, 2026 12:25
36bd2ec to
35fd349
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR #45596: [XLA:GPU] Support VA remapping of output buffer allocations
Imported from GitHub PR openxla/xla#45596
📝 Summary of Changes
This PR extends command-buffer virtual-address remapping to allocations that
escape to the caller (
maybe_live_out) while preserving the const ownershipmodel introduced by #45595.
the owning
BufferAllocationstable.GetRemappedBufferAllocationsto map finalized selected input/outputaddresses into their stable reservation slices immediately before execution.
continue to see external, deallocatable addresses.
finalized the owning address table.
logical external sizes, output deallocation, and deferred alias cleanup.
This PR is stacked on #45595, [XLA:GPU] Support VA remapping of parameter
buffer allocations. It is part 2 of 3 splitting the former #45568
implementation; #45597 adds the
SKIP_PROFILEDmode.🎯 Justification
Live-out buffers can outlive an execution scope, so the caller must retain a
normal allocator-owned address that remains valid and can be passed to
Deallocate(). At the same time, recorded command buffers need a stablereservation address.
Building a separate execution allocation table provides both properties
without mutating the owning table or removing its const qualifier. Deferring
the mapping until execution also ensures donation and copy protection have
already selected the final external address.
🚀 Kind of Contribution
✨ New Feature
📊 Benchmark (for Performance Improvements)
Not applicable as a standalone change. This PR adds output-buffer remapping
support but does not independently enable a new command-buffer update mode.
Performance evaluation belongs to the final
SKIP_PROFILEDpolicy in #45597.🧪 Unit Tests:
remapped live-out allocation.
and after execution.
and maps the correct raw physical allocation.
🧪 Execution Tests:
No standalone execution test is added for this enabling layer. End-to-end
live-out selection, execution, and output deallocation are covered by the
stacked
SKIP_PROFILEDchange in #45597.Copybara import of the project:
--
b7b79af2174271e65f2c7d8e8bac527a72e97af9 by Shawn Wang [email protected]:
[XLA:GPU] Support VA remapping of output buffer allocations
Keep selected maybe_live_out allocations at normal allocator-owned addresses in the owning BufferAllocations table. Immediately before execution, GetRemappedBufferAllocations maps the finalized selected input/output addresses into their stable reservation slices and rewrites only a non-owning execution copy.
This preserves const ownership semantics, handles donation and copy protection before mapping, and leaves output addresses deallocatable by callers. Extend the host-only VMM test to verify stable execution addresses, logical external sizes, unchanged owning buffers, and alias cleanup across executions.
Merging this change closes #45596
Reverts changelist 949495726
FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#45596 from shawnwang18:shawnw/cmd_buffer_va_remap_outputs b7b79af2174271e65f2c7d8e8bac527a72e97af9