blas

where can I find the numpy.matmul() source code?

where can I find the numpy.matmul() source code? Question: I do not obtain the same results when I use np.matmul(A, b) in Python and when I use xtensor-blas‘s xt::linalg::dot(A, b) in C++. I am investigating the reasons, as when saved and read from disk, A and b are identical when doing np.allclose(A, b) in Python. …

Total answers: 1

Find out if/which BLAS library is used by Numpy

Find out if/which BLAS library is used by Numpy Question: I use numpy and scipy in different environments (MacOS, Ubuntu, RedHat). Usually I install numpy by using the package manager that is available (e.g., mac ports, apt, yum). However, if you don’t compile Numpy manually, how can you be sure that it uses a BLAS …

Total answers: 3

Why does multiprocessing use only a single core after I import numpy?

Why does multiprocessing use only a single core after I import numpy? Question: I am not sure whether this counts more as an OS issue, but I thought I would ask here in case anyone has some insight from the Python end of things. I’ve been trying to parallelise a CPU-heavy for loop using joblib, …

Total answers: 3

Distributing Cython based extensions using LAPACK

Distributing Cython based extensions using LAPACK Question: I am writing a Python module that includes Cython extensions and uses LAPACK (and BLAS). I am open to using either clapack or lapacke, or some kind of f2c or f2py solution if necessary. What is important is that I am able to call lapack and blas routines …

Total answers: 1

Compiling numpy with OpenBLAS integration

Compiling numpy with OpenBLAS integration Question: I am trying to install numpy with OpenBLAS , however I am at loss as to how the site.cfg file needs to be written. When the installation procedure was followed the installation completed without errors, however there is performance degradation on increasing the number of threads used by OpenBLAS …

Total answers: 3

How to check BLAS/LAPACK linkage in NumPy and SciPy?

How to check BLAS/LAPACK linkage in NumPy and SciPy? Question: I am builing my numpy/scipy environment based on blas and lapack more or less based on this walk through. When I am done, how can I check, that my numpy/scipy functions really do use the previously built blas/lapack functionalities? Asked By: Woltan || Source Answers: …

Total answers: 5

Benchmarking (python vs. c++ using BLAS) and (numpy)

Benchmarking (python vs. c++ using BLAS) and (numpy) Question: I would like to write a program that makes extensive use of BLAS and LAPACK linear algebra functionalities. Since performance is an issue I did some benchmarking and would like know, if the approach I took is legitimate. I have, so to speak, three contestants and …

Total answers: 5

multithreaded blas in python/numpy

multithreaded blas in python/numpy Question: I am trying to implement a large number of matrix-matrix multiplications in Python. Initially, I assumed that NumPy would use automatically my threaded BLAS libraries since I built it against those libraries. However, when I look at top or something else it seems like the code does not use threading …

Total answers: 4