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

KokkosBatched contraction length bug #258

Closed
huttered40 opened this issue Jun 15, 2018 · 3 comments
Closed

KokkosBatched contraction length bug #258

huttered40 opened this issue Jun 15, 2018 · 3 comments

Comments

@huttered40
Copy link

In the partial specialization of the TeamGemm class template located in src/batched/KokkosBatched_Gemm_Team_Impl.hpp, for Trans::Transpose and a Trans::NoTranspose template parameters, the 3rd argument to the TeamGemmInternal<..>::invoke(..) method is A.extent(1), which is used as the contraction length (parameter k) in TeamGemmInternal<..>::invoke(..). I suspect this code has been used primarily for square matrices arising from finite element discretizations, so this bug has gone unnoticed. When calling this routine with unfolded tensors, however, it appears.

For example, in this specialization, A is transposed, so if A is passed in as a 100 x 4 View, then the contraction length will be 100, not 4. A.extent(1) is 4 here, however.

This same issue might be in the Gemm_Serial class template as well.

@srajama1
Copy link
Contributor

@kyungjoo-kim

@huttered40 : If you have already fixed it then you can put in a pull request to Kokkos-kernels.

huttered40 pushed a commit to huttered40/kokkos-kernels that referenced this issue Jun 18, 2018
huttered40 pushed a commit to huttered40/kokkos-kernels that referenced this issue Jun 21, 2018
…batched/KokkosBatched_Gemm_Serial_Impl.hpp.
srajama1 added a commit that referenced this issue Jun 22, 2018
@srajama1
Copy link
Contributor

PR #261 fixed this. Batched GEMM supports rectangular matrices now.

@srajama1
Copy link
Contributor

Reopened. @crtrott likes to close it with master update.

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

No branches or pull requests

5 participants