Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IFRT] Wrap RemapPlan::mappings with shared_ptr #12539

Merged
1 commit merged into from
May 16, 2024
Merged

[IFRT] Wrap RemapPlan::mappings with shared_ptr #12539

1 commit merged into from
May 16, 2024

Conversation

copybara-service[bot]
Copy link

[IFRT] Wrap RemapPlan::mappings with shared_ptr

xla::ifrt::RemapPlan's mappings is frequently reused across different
xla::ifrt::RemapPlan. It can be costly to keep a copy of mappings for each
plan if the mappings is not trivially small.

This change wraps mappings with std::shared_ptr so that it can be shared
more cheaply across multiple plans.

@copybara-service copybara-service bot force-pushed the test_634091756 branch 4 times, most recently from d4156ae to ac22871 Compare May 16, 2024 04:54
`xla::ifrt::RemapPlan`'s `mappings` is frequently reused across different
`xla::ifrt::RemapPlan`. It can be costly to keep a copy of `mappings` for each
plan if the mappings is not trivially small.

This change wraps `mappings` with `std::shared_ptr` so that it can be shared
more cheaply across multiple plans.

PiperOrigin-RevId: 634214931
@copybara-service copybara-service bot closed this pull request by merging all changes into main in 89b8b02 May 16, 2024
@copybara-service copybara-service bot deleted the test_634091756 branch May 16, 2024 05:40
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.

None yet

1 participant