blas

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

巧了我就是萌 提交于 2019-11-30 08:58:33
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 ? Sure, you have to have them installed, and on Ubuntu/Debian issue command update-alternatives --config libblas.so.3 You'll get numbered list of alternatives and could switch between them easily Link: https://wiki.debian.org/DebianScience/LinearAlgebraLibraries Yes, you can. You just need to use dynamic library linking. The libblas.so.3 is a soft linking to /etc/alternatives/libblas.so.3 Which in turn points to the BLAS library implementation For

Transpose matrix multiplication in cuBLAS howto

回眸只為那壹抹淺笑 提交于 2019-11-30 07:37:13
问题 The problem is simple: I have two matrices, A and B, that are M by N, where M >> N. I want to first take the transpose of A, and then multiply that by B (A^T * B) to put that into C, which is N by N. I have everything set up for A and B, but how do I call cublasSgemm properly without it returning the wrong answer? I understand that cuBlas has a cublasOperation_t enum for transposing things beforehand, but somehow I'm not quite using it correctly. My matrices A and B are in row-major order, i

cholesky decomposition ScaLapack error

强颜欢笑 提交于 2019-11-30 05:07:50
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 parameter number 2 had an illegal value { 0, 0}: On entry to PDPOTRF parameter number 2 had an illegal value info < 0: If the i-th argument is an array and the j-entry had an illegal value, then INFO = -(i*100+j), if the i-th argument is a scalar and had an illegal value, then INFO = -i. I Know what the error messages means but I followed the dated documentation available on

Element-wise vector-vector multiplication in BLAS?

蹲街弑〆低调 提交于 2019-11-30 04:59:35
Is there a means to do element-wise vector-vector multiplication with BLAS, GSL or any other high performance library ? (Taking the title of the question literally...) Yes it can be done with BLAS alone (though it is probably not the most efficient way.) The trick is to treat one of the input vectors as a diagonal matrix: ⎡a ⎤ ⎡x⎤ ⎡ax⎤ ⎢ b ⎥ ⎢y⎥ = ⎢by⎥ ⎣ c⎦ ⎣z⎦ ⎣cz⎦ You can then use one of the matrix-vector multiply functions that can take a diagonal matrix as input without padding, e.g. SBMV Example: void ebeMultiply(const int n, const double *a, const double *x, double *y) { extern void

libgfortran: version `GFORTRAN_1.4' not found

99封情书 提交于 2019-11-30 03:51:59
I am getting the following error when I trying to a run mex file in MATLAB: ??? Invalid MEX-file 'findimps3.mexa64': /MATLAB/bin/glnxa64/../../sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /usr/lib/libblas.so.3gf) Any ideas how to solve this problem? update: I found out that "strings MATLAB/.../libgfortran.so.3 | grep GFORTRAN" output GFORTRAN_1.0. I tried to changed libgfortran inside MATLAB but it didn't work. Not I think it's better to find a suitable libblas that works with GFORTRAN_1.0. read this link , it explains how to configure matlab on some linux

Purpose of LDA argument in BLAS dgemm?

天大地大妈咪最大 提交于 2019-11-30 03:07:43
The Fortran reference implementation documentation states: * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When TRANSA = 'N' or 'n' then * LDA must be at least max( 1, m ), otherwise LDA must be at * least max( 1, k ). * Unchanged on exit. However, given m and k shouldn't I be able to derive LDA? When is LDA permitted to be bigger than n (or k)? The distinction is between the logical size of the first dimensions of the arrays A and B and the physical size. The first is the size of the array that you are using, the second is the

TensorFlow: Blas GEMM launch failed

允我心安 提交于 2019-11-30 02:24:03
When I'm trying to use TensorFlow with Keras using the gpu, I'm getting this error message: C:\Users\nicol\Anaconda3\envs\tensorflow\lib\site-packages\ipykernel\__main__.py:2: UserWarning: Update your `fit_generator` call to the Keras 2 API: `fit_generator(<keras.pre..., 37800, epochs=2, validation_data=<keras.pre..., validation_steps=4200)` from ipykernel import kernelapp as app Epoch 1/2 InternalError Traceback (most recent call last) C:\Users\nicol\Anaconda3\envs\tensorflow\lib\site-packages\tensorflow\python\client\session.py in _do_call(self, fn, *args) 1038 try: -> 1039 return fn(*args)

Efficient way of computing matrix product AXA'?

久未见 提交于 2019-11-29 14:05:34
I'm currently using BLAS function DSYMM to compute Y = AX and then DGEMM for YA' , but I'm wondering is there some more efficient way of computing the matrix product AXA T , where A is an arbitrary n×n matrix and X is a symmetric n×n matrix? 来源: https://stackoverflow.com/questions/11139933/efficient-way-of-computing-matrix-product-axa

Does installing BLAS/ATLAS/MKL/OPENBLAS will speed up R package that is written in C/C++?

二次信任 提交于 2019-11-29 08:13:10
I found that using one of BLAS/ATLAS/MKL/OPENBLAS will give improvement on speed in R. However, will it still improve the R Package that is written in C or C++? for example, R package Glmnet is implemented in FORTRAN and R package rpart is implemented in C++. Will it just installing BLAS/...etc will improve the execution time? or do we have to rebuild (building new C code) the package based on BLAS/...etc? It is frequently stated, including in a comment here, that "you have to recompile R" to use different BLAS or LAPACK library. That is wrong. You do not have to recompile R provided it is

Armadillo + BLAS + LAPACK: Linking error?

一个人想着一个人 提交于 2019-11-29 07:40:02
When I try to compile example1.cpp that comes with Armadillo 2.4.2, I keep getting the following linking error: /tmp/ccbnLbA0.o: In function `double arma::blas::dot<double>(unsigned int, double const*, double const*)': main.cpp:(.text._ZN4arma4blas3dotIdEET_jPKS2_S4_[double arma::blas::dot<double>(unsigned int, double const*, double const*)]+0x3b): undefined reference to `wrapper_ddot_' /tmp/ccbnLbA0.o: In function `void arma::blas::gemv<double>(char const*, int const*, int const*, double const*, double const*, int const*, double const*, int const*, double const*, double*, int const*)': main