Questions tagged [blas]

The Basic Linear Algebra Subprograms are a standard set of interfaces for low-level vector and matrix operations commonly used in scientific computing.

A reference implementation is available at NetLib; optimized implementations are also available for all high-performance computing architectures, for example:

The BLAS routines are divided into three levels:

  • Level 1: vector operations e.g. vector addition, dot product
  • Level 2: matrix-vector operations e.g. matrix-vector multiplication
  • Level 3: matrix-matrix operations e.g. matrix multiplication
906 questions
18
votes
2 answers

Numpy, BLAS and CUBLAS

Numpy can be "linked/compiled" against different BLAS implementations (MKL, ACML, ATLAS, GotoBlas, etc). That's not always straightforward to configure but it is possible. Is it also possible to "link/compile" numpy against NVIDIA's CUBLAS…
Ümit
  • 17,379
  • 7
  • 55
  • 74
17
votes
2 answers

Set max number of threads at runtime on numpy/openblas

I'd like to know if it's possible to change at (Python) runtime the maximum number of threads used by OpenBLAS behind numpy? I know it's possible to set it before running the interpreter through the environment variable OMP_NUM_THREADS, but I'd like…
Théo T
  • 3,270
  • 5
  • 20
  • 22
17
votes
4 answers

What is the BigO of linear regression?

How large a system is it reasonable to attempt to do a linear regression on? Specifically: I have a system with ~300K sample points and ~1200 linear terms. Is this computationally feasible?
BCS
  • 75,627
  • 68
  • 187
  • 294
17
votes
3 answers

Why does MATLAB/Octave wipe the floor with C++ in Eigenvalue Problems?

I'm hoping that the answer to the question in the title is that I'm doing something stupid! Here is the problem. I want to compute all the eigenvalues and eigenvectors of a real, symmetric matrix. I have implemented code in MATLAB (actually, I run…
MGA
  • 1,658
  • 15
  • 28
16
votes
2 answers

Any good documentation for the cblas interface?

Can someone recommend a good reference or tutorial for the cblas interface? Nothing comes up on google, all of the man pages I've found are for the fortran blas interface, and the pdf that came with MKL literally took ten seconds to search and…
Andrew Wagner
  • 22,677
  • 21
  • 86
  • 100
16
votes
2 answers

No speedup for vector sums with threading

I have a C++ program which basically performs some matrix calculations. For these I use LAPACK/BLAS and usually link to the MKL or ACML depending on the platform. A lot of these matrix calculations operate on different independent matrices and hence…
Fabian
  • 173
  • 6
16
votes
4 answers

What is a good free (open source) BLAS/LAPACK library for .net (C#)?

I have a project written in C# where I need to do various linear algebraic operations on matrices (like LU-factorization). Since the program is mainly a prototype created to confirm a theory, a C# implementation will suffice (compared to a possibly…
Egil Hansen
  • 15,028
  • 8
  • 37
  • 54
16
votes
1 answer

Fortran 90/95 library for sparse matrices?

I am looking for a library for dealing with sparse matrices in fortran 90/95. I only need very basic operations like matrix-vector multiplication. What do you suggest I use? I have searched around and an extension(?) to BLAS called "sparse blas",…
arne
  • 677
  • 1
  • 6
  • 14
15
votes
3 answers

Theano CNN on CPU: AbstractConv2d Theano optimization failed

I'm trying to train a CNN for object detection on images with the CIFAR10 dataset for a seminar at my university but I get the following Error: AssertionError: AbstractConv2d Theano optimization failed: there is no implementation available…
Jonasson
  • 293
  • 1
  • 2
  • 11
15
votes
1 answer

cholesky decomposition ScaLapack error

I'm getting the following error and i'm not sure why. { 1, 1}: On entry to PDPOTRF parameter number 2 had an illegal value { 1, 0}: On entry to PDPOTRF parameter number 2 had an illegal value { 0, 1}: On entry to PDPOTRF…
pyCthon
  • 11,746
  • 20
  • 73
  • 135
15
votes
3 answers

How to use numpy with OpenBLAS instead of Atlas in Ubuntu?

I have looked for an easy way to install/compile Numpy with OpenBLAS but didn't find an easy answer. All the documentation I have seen takes too much knowledge as granted for someone like me who is not used to compile software. There are two…
PierreE
  • 675
  • 1
  • 11
  • 23
14
votes
1 answer

Faster evaluation of matrix multiplication from right to left

I noticed that evaluating matrix operations in quadratic form from right to left is significantly faster than left to right in R, depending on how the parentheses are placed. Obviously they both perform the same amount of calculation. I am wondering…
Taotao Tan
  • 273
  • 1
  • 8
13
votes
1 answer

Why are there no BLAS routines for addition and subtraction

In BLAS there are routines like dscal scale a vector by a constant dinit initialize a vector with given value daxpy perform y = a*x + y and so on. But there are apparently no routines for vector addition or vector subtraction. If this…
Andreas H.
  • 5,557
  • 23
  • 32
13
votes
3 answers

Is it possible to switch between BLAS libraries without recompiling program?

For example can I have Atlas, OpenBlas, MKL installed on my Ubuntu 14.04 at the same time and switch between them without recompiling Caffe?
mrgloom
  • 20,061
  • 36
  • 171
  • 301
13
votes
4 answers

Numpy Pure Functions for performance, caching

I'm writing some moderately performance critical code in numpy. This code will be in the inner most loop, of a computation that's run time is measured in hours. A quick calculation suggest that this code will be executed up something like 10^12…
Frames Catherine White
  • 27,368
  • 21
  • 87
  • 137
1 2
3
60 61