-
Notifications
You must be signed in to change notification settings - Fork 74k
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
Can we disable tensorflow's theading? #11066
Comments
No. It is possible to use a single executor thread and a single eigen thread, but the API as designed is likely to deadlock if you have no threads. |
Can you elaborate on how to use a single executor thread and a single eigen thread? I tracked down the error and the deepest failure point i can find is "impl_.reset(new ThreadPool::Impl(env, thread_options, "tf_" + name, num_threads, low_latency_hint));" |
The ConfigProto you pass to the first session you build in a process lets you specify how many dispatch and compute threads to use. |
I forgot to mention I'm using C++., Do you know how to do that in C++? Also to confirm, you mean it is impossible to have no thread, at least two treads, one executor and one eigen are needed, right? |
In C++ you can also use a configproto in sessionoptions: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/public/session_options.h The minimum I know you can have is 3 threads: the two you mentioned and the one which is calling tf code. |
I changed num_threads at line 116 in threadpool.cc to 0 and I bypassed the threading error but of course when I do sesson.run() I got pointer pointing to invalid address. |
0 is not supported, as I said above. It'll only work if each number of
threads is at least 1.
…On Tue, Jun 27, 2017 at 7:38 AM, kyo744 ***@***.***> wrote:
I changed num_threads at line 116 in threadpool.cc to 0 and I bypassed the
threading error but of course when I do sesson.run() I got pointer pointing
invalid address.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#11066 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAATxd2pat4f0M-Kw1QTvGnssMqzz2Z1ks5sIRP2gaJpZM4OFtTa>
.
--
- Alex
|
try this:
|
I've tried that. Any non zero value would cause my simulator to crash. |
This question is better asked on StackOverflow since it is not a bug or feature request. There is also a larger community that reads questions there. Thanks! |
I'm running tensorflow in a simulator that does not support mult-threading. Is it possible to disable tensorflow's multi-threading?
The text was updated successfully, but these errors were encountered: