How to limit computation to one CPU core? #6464
Unanswered
louis-shao
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I use jax as the frontend to dump a xla hlo module, following the example here, then compile and execute it with this openxla library. Is there a way I can limit the computation to one CPU core? I tried setting the number of cpu devices and max number of inflight computations both to 1, but it didn't work. What I observe is, if I add the
taskset Nprefix to bind the execution to one core, the computation time is about 2x longer than the case withouttaskset N, which seem indicating that it is not running on one core.Update:
HloModuleConfig::set_intra_op_parallelism_threadsand settingasynchronousto False when creating the client. Neither works.XLA_FLAGS="--xla_cpu_multi_thread_eigen=false intra_op_parallelism_threads=0"according to this makes the execution slower, but still quite faster than addingtaskset N.Beta Was this translation helpful? Give feedback.
All reactions