blas-src icon indicating copy to clipboard operation
blas-src copied to clipboard

Can cuBLAS be supported?

Open kimurayu45z opened this issue 4 years ago • 5 comments

Can cuBLAS be supported in this library? If it is able, it is very useful.

kimurayu45z avatar Apr 06 '21 03:04 kimurayu45z

https://github.com/rust-cuda/cuda-sys I found this one.

I propose that:

  • Creating "cublas-src" repository
  • In the "cublas-src" repository, write the code of wrapper for "cublas-sys" with BLAS interface.
  • In the "blas-src" repository, make the crate enable to choose "cublas-src"

I can contribute. How about it?

kimurayu45z avatar Aug 31 '21 13:08 kimurayu45z

Hi, thank you for the note! Yes, absolutely. It is very much encouraged to keep on extending the list of sources as long as they conform to the standard BLAS/LAPACK interface. Please take a look at the architecture:

https://github.com/blas-lapack-rs/blas-lapack-rs.github.io/wiki#sources

Can you please clarify why cublas-sys is needed? Do you mean the set of functions is larger than what is in the standard?

IvanUkhov avatar Sep 01 '21 07:09 IvanUkhov

Sorry it was my misunderstanding. cublas-sys is not needed. However, the interface of cuBLAS seems to be slightly different from it of BLAS, so I think we need the wrapper for using cuda with BLAS interface, instead of cublas-sys.

kimurayu45z avatar Nov 18 '21 12:11 kimurayu45z

It’s been a while. I think the main concern is that, if the APIs are drastically different, it would not fit into the current architecture, which is to have a small number of sys crates interfacing with different sources allowing one to build on top. Everything that is specific to a particular implementation should probably have its own sys create, as we discuss here.

IvanUkhov avatar Jul 17 '22 16:07 IvanUkhov

It might be more realistic to support NVBLAS, a library that Nvidia built on top of cuBLAS to be a drop-in replacement for BLAS. It also has heuristics about whether the GPU acceleration is worth the time it'd take to transfer the input to GPU memory and the output back.

Pr0methean avatar Oct 18 '23 18:10 Pr0methean