-
Notifications
You must be signed in to change notification settings - Fork 579
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
Tpetra: Replace use of Tpetra::Details::BLAS with KokkosKernels #2850
Comments
I searched tpetra directory of possible BLAS and LAPACK usages except for testing directories.
LAPACK is not used in Tpetra core directory but tsqr. I am going to remove the above files and replace their usages with kokkoskernels. I guess that all we need is to change gemv and gemm (possibly axpy). Am I missing something ? Questions:
|
@kyungjoo-kim wrote:
It was only ever used internally. If nothing in Trilinos uses it (look carefully in Stokhos), then we should delete it.
This is correct, as long as nothing in Trilinos currently uses them.
The point of the .cpp files is NOT to do ETI. It's specifically to hide includes of third-party libraries from users' code. In particular, cuBLAS has two different APIs -- version 1 and version 2. Tpetra uses version 1; Sierra uses version 2. It's legal to use both APIs in the same code, but it is NOT legal to include both header files in the same code. I hid the cuBLAS header include in the .cpp file because Sierra's build broke when I didn't do that. I will repeat this: We MUST hide TPL header includes in .cpp files. |
One more thing: It is absolutely critical that GEMV and GEMM not default to some slow reference implementation for the four Scalar types that BLAS implementations normally support. |
The reason I wrote the GEMV and GEMM wrappers in Tpetra was because kokkos-kernels didn't either GEMV or GEMM at the time. If kokkos-kernels still doesn't have GEMV or GEMM, then you can just copy and paste these into kokkos-kernels. |
No. The goal is for Tpetra to call kokkos-kernels for BLAS functions. Tpetra should call e.g., |
@kyungjoo-kim wrote:
come on, you can grep a little bit |
MueLu uses |
Please take note of #3235 and its pending fix. Thanks! |
@aprokop This issue is restricted the replace Tpetra::Details::Blas with KokkosKernels::Blas. I do not want to replace all Teuchos::BLAS and LAPACK. Also KokkosKernels do not have LAPACK functionalities. @mhoemmen The error reported from #3235 is blas library error check that we cannot handle. The solution should be to avoid zero dimensions when it calls BLAS functions. Instead of fixing Tpetra_Details_Blas.hpp (we are going to delete this anyway), let's fix the place where gemm is invoked to avoid zero dimensions. How do you like that ? |
@aprokop I am sorry that this issue title misleads you. I intended to replace Tpetra::Details::Blas. |
Done. |
Update Tpetra by replacing Tpetra::Details::BLAS with KokkosKernels.
The text was updated successfully, but these errors were encountered: