Skip to content

"Write your model in JAX they said. It'll be deterministic they said." #10674

Answered by mattjj
samuela asked this question in Q&A
Discussion options

You must be logged in to vote

Hey! It seems like a good time to answer this question! Or at least, better late than never...

I want to distinguish two things:

  1. whether jax.random generates deterministic random bits as a pure function of the random seed given, and
  2. other sources of GPU nondeterminism that have nothing to do with jax.random or pseudorandom number generation.

I think the question here is really about the latter. GPUs have several sources of nondeterminism, as mentioned in the (unmerged) #4824. For example, XLA:GPU might autotune cudnn conv kernels or Triton kernels, deciding which to employ based on which it measures to be fastest on your card at the moment. As another example, any multithreaded reductio…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@brett-daley
Comment options

Answer selected by samuela
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants