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

[jax] Combine GlobalJitState and ThreadLocalJitState into single JitState #53515

Merged
merged 3 commits into from Dec 23, 2021

Conversation

skye
Copy link
Member

@skye skye commented Dec 22, 2021

This avoids duplication when defining new fields. This change also
creates standard getters for each field that check if there's
thread-local state defined and make sure a global value is set when
appropriate.

…tate

This avoids duplication when defining new fields. This change also
creates standard getters for each field that check if there's
thread-local state defined and make sure a global value is set when
appropriate.
@google-ml-butler google-ml-butler bot added the size:M CL Change Size: Medium label Dec 22, 2021
@google-ml-butler google-ml-butler bot added the awaiting review Pull request awaiting review label Dec 22, 2021
@skye skye requested review from hawkinsp and removed request for sanjoy and joker-eph December 22, 2021 01:42
@gbaned gbaned added the comp:xla XLA label Dec 22, 2021
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Dec 22, 2021
@@ -382,7 +382,9 @@ xla::StatusOr<py::object> PmapFunction::Call(py::args args, py::kwargs kwargs) {
arguments.signature.dynamic_arg_signatures.push_back(
std::move(signature_or_error).ValueOrDie());
}
arguments.signature.global_extra_jit_context = global_state.extra_jit_context;
CHECK(global_state.extra_jit_context.has_value());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'd avoid the CHECK here and just make the arguments.signature.global_extra_jit_context field optional as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, done.

@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 22, 2021
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Dec 22, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 22, 2021
@google-ml-butler google-ml-butler bot removed the ready to pull PR ready for merge process label Dec 22, 2021
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Dec 22, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Dec 22, 2021
@google-ml-butler google-ml-butler bot removed the ready to pull PR ready for merge process label Dec 22, 2021
@skye skye added the ready to pull PR ready for merge process label Dec 22, 2021
@copybara-service copybara-service bot merged commit ebdbd61 into tensorflow:master Dec 23, 2021
@google-ml-butler google-ml-butler bot removed awaiting review Pull request awaiting review ready to pull PR ready for merge process labels Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:xla XLA size:M CL Change Size: Medium
Projects
PR Queue
  
Approved by Reviewer
Development

Successfully merging this pull request may close these issues.

None yet

4 participants