Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you *get* the number of threads for BLAS operations in Julia?

Tags:

julia

Julia's blas library has a function set_num_threads() which sets the threads for BLAS operations.

How do I get the number of threads being used by default, or currently?

like image 664
David Parks Avatar asked May 28 '16 16:05

David Parks


1 Answers

As of Julia 1.6, you can use LinearAlgebra.BLAS.get_num_threads(). So the following code will do the trick:

using LinearAlgebra
BLAS.get_num_threads()
like image 200
Héliton Martins Avatar answered Sep 29 '22 20:09

Héliton Martins