Skip to content

Enforcing single-thread behaviour from jax #22739

Closed Answered by froystig
Kamuish asked this question in Q&A
Discussion options

You must be logged in to vote

Stepping back, what are you looking to do? If you are looking to guarantee that jax (and the full stack below it) will use exactly one thread, this is simply not possible. No matter what, jax (etc.) will use threads. We can try to restrict the number of threads in places where configuration allows it, but it won't restrict the entire system to exactly one.

The flags we've discussed so far are the configuration points that I know of, and so we're correctly restricting things where we can. It may be worthwhile to also try setting the environment variable NPROC=1 as well.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Kamuish
Comment options

@froystig
Comment options

Answer selected by Kamuish
@Kamuish
Comment options

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