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

Create a compiler object on every call of Compiler::GetForPlatform(). #23436

Merged
merged 1 commit into from
Apr 2, 2025

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Mar 6, 2025

Create a compiler object on every call of Compiler::GetForPlatform().

This is a first step in moving from xla::Compiler instance being a statically constructed singleton. We want to move all registrations to factories instead of singletons, so that every user creates their own compiler instance and sharing of instances becomes explicit. This should prevent race conditions and make code thread-safe.

@copybara-service copybara-service bot force-pushed the test_734060671 branch 6 times, most recently from 78fe175 to 56c7ffa Compare March 11, 2025 13:32
@copybara-service copybara-service bot force-pushed the test_734060671 branch 4 times, most recently from 99a7742 to f6557f2 Compare March 18, 2025 14:18
@copybara-service copybara-service bot force-pushed the test_734060671 branch 5 times, most recently from 5cf383c to eb4b324 Compare April 2, 2025 13:53
This is a first step in moving from xla::Compiler instance being a statically constructed singleton. We want to move all registrations to factories instead of singletons, so that every user creates their own compiler instance and sharing of instances becomes explicit. This should prevent race conditions and make code thread-safe.

PiperOrigin-RevId: 743128681
@copybara-service copybara-service bot merged commit 0ba3b3b into main Apr 2, 2025
@copybara-service copybara-service bot deleted the test_734060671 branch April 2, 2025 14:32
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