Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] cblas_zomatadd should be supported. #4236

Open
xqch1983 opened this issue Sep 21, 2023 · 5 comments
Open

[Feature Request] cblas_zomatadd should be supported. #4236

xqch1983 opened this issue Sep 21, 2023 · 5 comments

Comments

@xqch1983
Copy link

xqch1983 commented Sep 21, 2023

The clbas_zomatadd should be supported same with the interface in MKL. implement the addition of two matrixes as bellow:
C := alphaop(A) + betaop(B)

The API in MKL is mkl_?omatadd, which scales and adds two matrices, as well as performing out-of-place transposition operations.

@martin-frbg
Copy link
Collaborator

So something like omatcopy plus axpby looping over all columns... may I ask what the use case for this is, apart from it being part of MKL's BLAS-like extensions ?

@brada4
Copy link
Contributor

brada4 commented Sep 22, 2023

Cast matrices to vectors.
Scal one and axpy other?

@xqch1983
Copy link
Author

So something like omatcopy plus axpby looping over all columns... may I ask what the use case for this is, apart from it being part of MKL's BLAS-like extensions ?

Yes, I checked the use case of matrix is that rows=m, cols=1 or rows=1, cols=n, so this omatadd case can be replaced by omatcopy and axpy. Actually, users want to replace the MKL BLAS API using OpenBLAS API one-to-one directly.

@brada4
Copy link
Contributor

brada4 commented Sep 23, 2023

So make supercompat header to do the casts. BLAS L1 is quite well optimised by modern compilers.

@martin-frbg
Copy link
Collaborator

So something like omatcopy plus axpby looping over all columns... may I ask what the use case for this is, apart from it being part of MKL's BLAS-like extensions ?

Yes, I checked the use case of matrix is that rows=m, cols=1 or rows=1, cols=n, so this omatadd case can be replaced by omatcopy and axpy. Actually, users want to replace the MKL BLAS API using OpenBLAS API one-to-one directly.

do you happen to have sample code and/or a testcase ? I'm primarily curious in what kind of context this particular function is useful (and of course it is a general problem with BLAS extensions that few libraries implement them - besides the one who "invented" it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants