Find out if/which BLAS library is used by Numpy

numpy.show_config() doesn’t always give reliable information. For example, if I apt-get install python-numpy on Ubuntu 14.04, the output of np.show_config() looks like this: blas_info: libraries = [‘blas’] library_dirs = [‘/usr/lib’] language = f77 lapack_info: libraries = [‘lapack’] library_dirs = [‘/usr/lib’] language = f77 atlas_threads_info: NOT AVAILABLE blas_opt_info: libraries = [‘blas’] library_dirs = [‘/usr/lib’] language = … Read more

Compiling numpy with OpenBLAS integration

I just compiled numpy inside a virtualenv with OpenBLAS integration, and it seems to be working OK. This was my process: Compile OpenBLAS: $ git clone https://github.com/xianyi/OpenBLAS $ cd OpenBLAS && make FC=gfortran $ sudo make PREFIX=/opt/OpenBLAS install If you don’t have admin rights you could set PREFIX= to a directory where you have write … Read more

Purpose of LDA argument in BLAS dgemm?

The LDA parameter in BLAS is effectively the stride of the matrix as it is laid out in linear memory. It is perfectly valid to have an LDA value which is larger than the leading dimension of the matrix which is being operated on. Typical cases where it is either useful or necessary to use … Read more

TensorFlow: Blas GEMM launch failed

This worked for me on TensorFlow 2.1.0 (per: https://www.tensorflow.org/api_docs/python/tf/config/experimental/set_memory_growth) import tensorflow as tf physical_devices = tf.config.list_physical_devices(‘GPU’) for device in physical_devices: tf.config.experimental.set_memory_growth(device, True)

Distributing Cython based extensions using LAPACK

If I have understood the question correctly, you could make use of SciPy’s Cython wrappers for BLAS and LAPACK routines. These wrappers are documented here: BLAS LAPACK As the documentation states, you are responsible for checking that any arrays that you pass to these functions are aligned correctly for the Fortran routines. You can simply … Read more

TensorFlow: InternalError: Blas SGEMM launch failed

Old question, but may help others. Try to close interactive sessions active in other processes (if IPython Notebook – just restart kernels). This helped me! Additionally, I use this code to close local sessions in this kernel during experiments: if ‘session’ in locals() and session is not None: print(‘Close interactive session’) session.close()

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)