Questions tagged [cblas]

59 questions
5
votes
2 answers

Link error with cblas when installing scikit-learn

On my RHEL7, I am trying to install py-earth and getting this link error: /usr/bin/ld: cannot find -lcblas I have packages blas, blas-devel, atlas and atlas-devel installed. The compilation command printed after this error…
Alberto Contador
  • 263
  • 1
  • 13
4
votes
0 answers

Importing Numpy fails after building from source against amd blis

I'm trying to build a local version of Numpy from source against BLIS (for BLAS and CBLAS) and against OpenBLAS for LAPACK. I started with building BLIS locally for zen3 with CBLAS enabled, like so: ./configure --enable-threading=openmp…
Crispy Holiday
  • 412
  • 1
  • 9
  • 28
4
votes
1 answer

Matrix Inversion in CBLAS/LAPACK vs Python

The matrix I am trying to invert is: [ 1 0 1] A = [ 2 0 1] [-1 1 1] The true inverse is: [-1 1 0] A^-1 = [-3 2 1] [ 2 -1 0] Using Python's numpy.linalg.inv, I get the correct answer. One of my routines for matrix…
The Dude
  • 661
  • 2
  • 11
  • 20
2
votes
4 answers

Linking external cblas archive library using cmake

I downloaded and built (seemingly correctly) the relevant BLAS and CBLAS libraries (from netlib.org/blas) in my Linux Fedora environment. The result of this was a blas_LINUX.a file, which I renamed libblas.a and copied to \usr\local\lib, and a…
Ruaghain
  • 135
  • 1
  • 14
2
votes
1 answer

How can I copy a strided matrix in BLAS?

BLAS level 3 Matrix/Matrix routines take arguments lda, ldb etc. that allow one to pass 'strided' matrices, as far as I understand. For instance, if I have the following 2 x 2 column-major matrix: |1 2| |3 4| |x x| where x's are data I want…
Luciano
  • 2,388
  • 1
  • 22
  • 33
2
votes
1 answer

Computation of Pseidoinverse with SVD in C++ using BLAS and LAPACKE

I am trying to implement the pseudoinverse computation A* of a matrix in order to solve the Ax=b for a square nxn matrix A with dimensions in C++. The arithmetic formula for A* is through the SVD decomposition. So first I compute SVD(A)=USV^T and…
curious
  • 1,524
  • 6
  • 21
  • 45
2
votes
1 answer

Proper way to calculate `trans(a)*inv(b)*a` with Intel MKL

I am using Intel's MKL LAPACKE and CBLAS to calculate yn = trans(a)*inv(zt)*a + trans(b)*inv(zl)*b Where a and b are m-by-n real matrices, zt and zl are m-by-m complex matrices. The resulting complex matrix yn is n-by-n. Here is how I am doing…
2
votes
0 answers

cython_blas level 1 routine orders of magnitude faster than Cython for loop

I've come across a performance difference between a call to cblas (namely daxpy: perform y += alpha * x where y and x are vectors of the same length, and alpha is a scalar) and the same operation performed in pure cython. Here's my benchmark, using…
P. Camilleri
  • 12,664
  • 7
  • 41
  • 76
2
votes
1 answer

I converted a c++ vector data-set into a c array. I pass the same data-set into a function that should give the same output

This code should generate the same output. But the c output seems to be rounded up while c++ is not. I don't understand what is going on here. Please explain. Upto the point where I show the code, same values are passed to both c and c++ code. c…
MadHatter
  • 321
  • 7
  • 17
2
votes
1 answer

mkl cblas_dgemm wrong parameter

I tried to use mkl cblas_dgemm to compute matrix matrix multiplication. As I know, lda, ldb, ldc should be the number of columns for simple row major matrix. I tried to do following: double a[3 * 2] = { 1,2,3,4,5,6 }; // 3 x 2 matrix double b[2…
Dohyun
  • 642
  • 4
  • 15
2
votes
0 answers

usage of lda and ldb in sgemm matrix mulitiplication function

While debugging a matrix multiplication error, I arrived at this ATLAS code. This code looks too complex and I don't want to look further inside.(no time.. :) ) It's for general matrix multiplication alpha*A*B + beta*C and I guess the result is…
Chan Kim
  • 5,177
  • 12
  • 57
  • 112
2
votes
1 answer

cblas linking: undefined reference to `cblas_dgemv'

I am trying to use cblas library to use BLAS. I call cblas function from a custom C function and then link this file to my C++ file. But I get this error Cfile.o: In function `mm_blas': Cfile.c:(.text+0xbf): undefined reference to…
asdfkjasdfjk
  • 3,784
  • 18
  • 64
  • 104
2
votes
1 answer

undefined reference to cblas_sgemm

I have the following make file g++ -Wall -O3 -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 Matrix.cc -L /usr/lib64/libcblas.so.0 util.cc word_io.cc net_lbl_2reps_scalable.cc train_lbl_2r_ptb.cc -o train_lbl_2r_ptb However I get the error…
akshita007
  • 549
  • 1
  • 9
  • 15
1
vote
2 answers

trouble running make on CBLAS

I'm trying to build a BLAS shared library for use with ghostjat/np cannot get make to run successfully on the CBLAS source code. I performed these exact steps on an Ubuntu 20 workstation: # create new directory mkdir ~/blas cd ~/blas # fetch and…
S. Imp
  • 2,833
  • 11
  • 24
1
vote
0 answers

Crash with Intel OneApi MKl cblas_zgemm()

I am having partial success using the complex matrix multiplier method cblas_zgemm() as part of Intel's OneApi MKL (2022.2.0). I get a crash (access memory violation), on either Windows or Linux, when I use CblasConjTrans as, specifically, the…
PaulS
  • 11
  • 2
1
2 3 4