After reading
https://github.com/flame/blis/wiki/Multithreading
I realize I need
./configure --enable-threading=pthreads ......
to make Blis threadsafe.
However, since I thread myself then I do want Blis to run single threaded independent of the setting of
export BLIS_NUM_THREADS=8
Will the setting
bli_thread_set_num_threads( 1 );
after bli_init achieve this?
Erling,
Sorry for the delayed response. I don't know how this message fell through the cracks, but it did. Apologies.
Yes, using bli_thread_set_num_threads() to set the number of threads to 1 (after bli_init(), of course) should have the desired effect of BLIS running single-threaded but also thread-safe.
One caveat: Please make sure that bli_init()/bli_finalize() are outside of your application's threaded region. I don't recall if these functions are also thread-safe.
Let us know if you have any other questions.
Field
On 08/21/2017 02:55 AM, Erling D. Andersen wrote:
Hi
After reading
https://github.com/flame/blis/wiki/Multithreading
I realize I need
./configure --enable-threading=pthreads ......
to make Blis threadsafe.
However, since I thread myself then I do want Blis to run single threaded independent of the setting of
export BLIS_NUM_THREADS=8
Will the setting
bli_thread_set_num_threads( 1 );
after bli_init achieve this?
--
You received this message because you are subscribed to the Google Groups "blis-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blis-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to blis-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/blis-discuss.
For more options, visit https://groups.google.com/d/optout.