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

[RFC]: Add BLAS bindings and implementations for linear algebra (tracking issue) #2039

Open
aman-095 opened this issue Mar 25, 2024 · 10 comments · Fixed by #3456
Open

[RFC]: Add BLAS bindings and implementations for linear algebra (tracking issue) #2039

aman-095 opened this issue Mar 25, 2024 · 10 comments · Fixed by #3456
Labels
Accepted RFC feature request which has been accepted. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). C Issue involves or relates to C. difficulty: 4 Likely to be moderately difficult. Feature Issue or pull request for adding a new feature. Fortran Issue involves or relates to Fortran. JavaScript Issue involves or relates to JavaScript. Native Addons Issue involves or relates to Node.js native add-ons. priority: High High priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. status: In Progress Issue or pull request which is in progress. Tracking Issue Tracking issue. WebAssembly Issue involves or relates to WebAssembly.

Comments

@aman-095
Copy link
Member

aman-095 commented Mar 25, 2024

Description

This RFC proposes adding BLAS routines. The purpose of this issue is to serve as a tracking issue for adding BLAS routines.

Implementation Status for BLAS Routines

Level 1

Single Precision

  • SROTG
    • JavaScript
    • C/Fortran
  • SROTMG
    • JavaScript
    • C/Fortran
  • SROT
    • JavaScript
    • C/Fortran
  • SROTM
    • JavaScript
    • C/Fortran
  • SSWAP
    • JavaScript
    • C/Fortran
  • SSCAL
    • JavaScript
    • C/Fortran
  • SCOPY
    • JavaScript
    • C/Fortran
  • SAXPY
    • JavaScript
    • C/Fortran
  • SDOT
    • JavaScript
    • C/Fortran
  • SDSDOT
    • JavaScript
    • C/Fortran
  • SNRM2
    • JavaScript
    • C/Fortran
  • SCNRM2
    • JavaScript
    • C/Fortran
  • SASUM
    • JavaScript
    • C/Fortran
  • ISAMAX
    • JavaScript
    • C/Fortran

Double Precision

  • DROTG
    • JavaScript
    • C/Fortran
  • DROTMG
    • JavaScript
    • C/Fortran
  • DROT
    • JavaScript
    • C/Fortran
  • DROTM
    • JavaScript
    • C/Fortran
  • DSWAP
    • JavaScript
    • C/Fortran
  • DSCAL
    • JavaScript
    • C/Fortran
  • DCOPY
    • JavaScript
    • C/Fortran
  • DAXPY
    • JavaScript
    • C/Fortran
  • DDOT
    • JavaScript
    • C/Fortran
  • DSDOT
    • JavaScript
    • C/Fortran
  • DNRM2
    • JavaScript
    • C/Fortran
  • DZNRM2
    • JavaScript
    • C/Fortran
  • DASUM
    • JavaScript
    • C/Fortran
  • IDAMAX
    • JavaScript
    • C/Fortran

Complex Single

  • CROTG
    • JavaScript
    • C/Fortran
  • CSROT
    • JavaScript
    • C/Fortran
  • CSWAP
    • JavaScript
    • C/Fortran
  • CSCAL
    • JavaScript
    • C/Fortran
  • CSSCAL
    • JavaScript
    • C/Fortran
  • CCOPY
    • JavaScript
    • C/Fortran
  • CAXPY
    • JavaScript
    • C/Fortran
  • CDOTU
    • JavaScript
    • C/Fortran
  • CDOTC
    • JavaScript
    • C/Fortran
  • SCASUM
    • JavaScript
    • C/Fortran
  • ICAMAX
    • JavaScript
    • C/Fortran

Complex Double

  • ZROTG
    • JavaScript
    • C/Fortran
  • ZDROT
    • JavaScript
    • C/Fortran
  • ZSWAP
    • JavaScript
    • C/Fortran
  • ZSCAL
    • JavaScript
    • C/Fortran
  • ZDSCAL
    • JavaScript
    • C/Fortran
  • ZCOPY
    • JavaScript
    • C/Fortran
  • ZAXPY
    • JavaScript
    • C/Fortran
  • ZDOTU
    • JavaScript
    • C/Fortran
  • ZDOTC
    • JavaScript
    • C/Fortran
  • DZASUM
    • JavaScript
    • C/Fortran
  • IZAMAX
    • JavaScript
    • C/Fortran

Level 2

Single Precision

  • SGEMV
    • JavaScript
    • C/Fortran
  • SGBMV
    • JavaScript
    • C/Fortran
  • SSYMV
    • JavaScript
    • C/Fortran
  • SSBMV
    • JavaScript
    • C/Fortran
  • SSPMV
    • JavaScript
    • C/Fortran
  • STRMV
    • JavaScript
    • C/Fortran
  • STBMV
    • JavaScript
    • C/Fortran
  • STPMV
    • JavaScript
    • C/Fortran
  • STRSV
    • JavaScript
    • C/Fortran
  • STBSV
    • JavaScript
    • C/Fortran
  • STPSV
    • JavaScript
    • C/Fortran
  • SGER
    • JavaScript
    • C/Fortran
  • SSYR
    • JavaScript
    • C/Fortran
  • SSPR
    • JavaScript
    • C/Fortran
  • SSYR2
    • JavaScript
    • C/Fortran
  • SSPR2
    • JavaScript
    • C/Fortran

Double Precision

  • DGEMV
    • JavaScript
    • C/Fortran
  • DGBMV
    • JavaScript
    • C/Fortran
  • DSYMV
    • JavaScript
    • C/Fortran
  • DSBMV
    • JavaScript
    • C/Fortran
  • DSPMV
    • JavaScript
    • C/Fortran
  • DTRMV
    • JavaScript
    • C/Fortran
  • DTBMV
    • JavaScript
    • C/Fortran
  • DTPMV
    • JavaScript
    • C/Fortran
  • DTRSV
    • JavaScript
    • C/Fortran
  • DTBSV
    • JavaScript
    • C/Fortran
  • DTPSV
    • JavaScript
    • C/Fortran
  • DGER
    • JavaScript
    • C/Fortran
  • DSYR
    • JavaScript
    • C/Fortran
  • DSPR
    • JavaScript
    • C/Fortran
  • DSYR2
    • JavaScript
    • C/Fortran
  • DSPR2
    • JavaScript
    • C/Fortran

Complex Single

  • CGEMV
    • JavaScript
    • C/Fortran
  • CGBMV
    • JavaScript
    • C/Fortran
  • CHEMV
    • JavaScript
    • C/Fortran
  • CHBMV
    • JavaScript
    • C/Fortran
  • CHPMV
    • JavaScript
    • C/Fortran
  • CTRMV
    • JavaScript
    • C/Fortran
  • CTBMV
    • JavaScript
    • C/Fortran
  • CTPMV
    • JavaScript
    • C/Fortran
  • CTRSV
    • JavaScript
    • C/Fortran
  • CTBSV
    • JavaScript
    • C/Fortran
  • CTPSV
    • JavaScript
    • C/Fortran
  • CGERU
    • JavaScript
    • C/Fortran
  • CGERC
    • JavaScript
    • C/Fortran
  • CHER
    • JavaScript
    • C/Fortran
  • CHPR
    • JavaScript
    • C/Fortran
  • CHER2
    • JavaScript
    • C/Fortran
  • CHPR2
    • JavaScript
    • C/Fortran

Complex Double

  • ZGEMV
    • JavaScript
    • C/Fortran
  • ZGBMV
    • JavaScript
    • C/Fortran
  • ZHEMV
    • JavaScript
    • C/Fortran
  • ZHBMV
    • JavaScript
    • C/Fortran
  • ZHPMV
    • JavaScript
    • C/Fortran
  • ZTRMV
    • JavaScript
    • C/Fortran
  • ZTBMV
    • JavaScript
    • C/Fortran
  • ZTPMV
    • JavaScript
    • C/Fortran
  • ZTRSV
    • JavaScript
    • C/Fortran
  • ZTBSV
    • JavaScript
    • C/Fortran
  • ZTPSV
    • JavaScript
    • C/Fortran
  • ZGERU
    • JavaScript
    • C/Fortran
  • ZGERC
    • JavaScript
    • C/Fortran
  • ZHER
    • JavaScript
    • C/Fortran
  • ZHPR
    • JavaScript
    • C/Fortran
  • ZHER2
    • JavaScript
    • C/Fortran
  • ZHPR2
    • JavaScript
    • C/Fortran

Level 3

Single Precision

  • SGEMM
    • JavaScript
    • C/Fortran
  • SSYMM
    • JavaScript
    • C/Fortran
  • SSYRK
    • JavaScript
    • C/Fortran
  • SSYR2K
    • JavaScript
    • C/Fortran
  • STRMM
    • JavaScript
    • C/Fortran
  • STRSM
    • JavaScript
    • C/Fortran

Double Precision

  • DGEMM
    • JavaScript
    • C/Fortran
  • DSYMM
    • JavaScript
    • C/Fortran
  • DSYRK
    • JavaScript
    • C/Fortran
  • DSYR2K
    • JavaScript
    • C/Fortran
  • DTRMM
    • JavaScript
    • C/Fortran
  • DTRSM
    • JavaScript
    • C/Fortran

Complex Single

  • CGEMM
    • JavaScript
    • C/Fortran
  • CSYMM
    • JavaScript
    • C/Fortran
  • CHEMM
    • JavaScript
    • C/Fortran
  • CSYRK
    • JavaScript
    • C/Fortran
  • CHERK
    • JavaScript
    • C/Fortran
  • CSYR2K
    • JavaScript
    • C/Fortran
  • CHER2K
    • JavaScript
    • C/Fortran
  • CTRMM
    • JavaScript
    • C/Fortran
  • CTRSM
    • JavaScript
    • C/Fortran

Complex Double

  • ZGEMM
    • JavaScript
    • C/Fortran
  • ZSYMM
    • JavaScript
    • C/Fortran
  • ZHEMM
    • JavaScript
    • C/Fortran
  • ZSYRK
    • JavaScript
    • C/Fortran
  • ZHERK
    • JavaScript
    • C/Fortran
  • ZSYR2K
    • JavaScript
    • C/Fortran
  • ZHER2K
    • JavaScript
    • C/Fortran
  • ZTRMM
    • JavaScript
    • C/Fortran
  • ZTRSM
    • JavaScript
    • C/Fortran

Related Issues

None.

Questions

No.

Other

No.

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@kgryte kgryte added RFC Request for comments. Feature requests and proposed changes. Feature Issue or pull request for adding a new feature. Native Addons Issue involves or relates to Node.js native add-ons. Accepted RFC feature request which has been accepted. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). priority: High High priority concern or feature request. Tracking Issue Tracking issue. Fortran Issue involves or relates to Fortran. C Issue involves or relates to C. difficulty: 4 Likely to be moderately difficult. JavaScript Issue involves or relates to JavaScript. labels Mar 28, 2024
kgryte added a commit that referenced this issue Apr 3, 2024
PR-URL: 	#2064
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
kgryte added a commit that referenced this issue Apr 3, 2024
PR-URL: 	#2075
Closes: #2047
Ref: #2039
Ref: https://netlib.org/lapack/explore-html-3.6.1/d2/df9/group__complex16__blas__level1_ga13a187010a0cae1fef2820072404e857.html#ga13a187010a0cae1fef2820072404e857
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
@aman-095
Copy link
Member Author

Working on idamax and isamax level 1 routines. 

@kgryte
Copy link
Member

kgryte commented Apr 12, 2024

@performant23 That one is already being worked on in #2104.

@kgryte
Copy link
Member

kgryte commented Apr 12, 2024

@performant23 Maybe try dznrm2?

@performant23
Copy link
Contributor

performant23 commented Apr 12, 2024

Oh, hey! I think csscal is different right? In cscal we have a complex scalar and in csscal we have a real scalar if I remember correctly.

@kgryte
Copy link
Member

kgryte commented Apr 12, 2024

Ah, you're right. That one should be straightforward.

@performant23
Copy link
Contributor

Hi @kgryte, we would need a generic interface to perform Givens rotation with vectors of other data types like integers, right? If so, I'd like to work on such an interface i.e. grot to get an idea of how generic g* interfaces are sampled from their equivalent d* implementations and also since we have implementations for those available for this package (JS implementation for drot is reviewed), this should be good to go!

@aman-095
Copy link
Member Author

Working on Level 1 routine drotm

@kgryte
Copy link
Member

kgryte commented Apr 16, 2024

@performant23 Yes, go for it. The one thing you need to do is ensure accessor array support. See gcopy and gswap for an idea.

kgryte added a commit that referenced this issue Apr 16, 2024
PR-URL: 	#2152
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
Reviewed-by: Pranav Goswami <goswami.4@iitj.ac.in>
kgryte added a commit that referenced this issue Apr 19, 2024
PR-URL: #1823
Closes: #276
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: Pranav Goswami <goswami.4@iitj.ac.in>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Reviewed-by: Pranav Goswami <goswami.4@iitj.ac.in>
Signed-off-by: Athan Reines <kgryte@gmail.com>
Signed-off-by: Pranav Goswami <goswami.4@iitj.ac.in>
kgryte added a commit that referenced this issue Nov 21, 2024
PR-URL: #3211
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
kgryte added a commit that referenced this issue Nov 21, 2024
PR-URL: #3030
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
kgryte added a commit that referenced this issue Nov 22, 2024
PR-URL: #3163
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
kgryte added a commit that referenced this issue Nov 22, 2024
PR-URL: #3203
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
kgryte added a commit that referenced this issue Nov 22, 2024
PR-URL: #3204
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Muhammad Haris <harriskhan047@outlook.com>
Reviewed-by: Aman Bhansali <bhansali.1@iitj.ac.in>
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
pranav-1720 pushed a commit to pranav-1720/stdlib that referenced this issue Nov 25, 2024
PR-URL: stdlib-js#3211
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
pranav-1720 pushed a commit to pranav-1720/stdlib that referenced this issue Nov 25, 2024
PR-URL: stdlib-js#3030
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
pranav-1720 pushed a commit to pranav-1720/stdlib that referenced this issue Nov 25, 2024
PR-URL: stdlib-js#3163
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
pranav-1720 pushed a commit to pranav-1720/stdlib that referenced this issue Nov 25, 2024
PR-URL: stdlib-js#3203
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
pranav-1720 pushed a commit to pranav-1720/stdlib that referenced this issue Nov 25, 2024
PR-URL: stdlib-js#3204
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Muhammad Haris <harriskhan047@outlook.com>
Reviewed-by: Aman Bhansali <bhansali.1@iitj.ac.in>
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
@kgryte kgryte added the WebAssembly Issue involves or relates to WebAssembly. label Nov 26, 2024
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Dec 4, 2024
PR-URL: stdlib-js#3211
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Dec 4, 2024
PR-URL: stdlib-js#3030
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Dec 4, 2024
PR-URL: stdlib-js#3163
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Dec 4, 2024
PR-URL: stdlib-js#3203
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Neerajpathak07 pushed a commit to Neerajpathak07/stdlib that referenced this issue Dec 4, 2024
PR-URL: stdlib-js#3204
Ref: stdlib-js#2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Muhammad Haris <harriskhan047@outlook.com>
Reviewed-by: Aman Bhansali <bhansali.1@iitj.ac.in>
Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Co-authored-by: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com>
kgryte added a commit that referenced this issue Dec 12, 2024
PR-URL: #3456
Ref: #2039
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Athan Reines <kgryte@gmail.com> 
Signed-off-by: Athan Reines <kgryte@gmail.com>
@Planeshifter Planeshifter reopened this Dec 12, 2024
@MeastroZI
Copy link
Contributor

For SROTMG do we need to perform the scaling check as done in the Lapack Fortren implementation .
It seems that the SciPy implementation doesn’t include this step.

@MeastroZI
Copy link
Contributor

SROTMG in SciPy only returning the transformation matrix and flag .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted RFC feature request which has been accepted. BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). C Issue involves or relates to C. difficulty: 4 Likely to be moderately difficult. Feature Issue or pull request for adding a new feature. Fortran Issue involves or relates to Fortran. JavaScript Issue involves or relates to JavaScript. Native Addons Issue involves or relates to Node.js native add-ons. priority: High High priority concern or feature request. RFC Request for comments. Feature requests and proposed changes. status: In Progress Issue or pull request which is in progress. Tracking Issue Tracking issue. WebAssembly Issue involves or relates to WebAssembly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants