-
Notifications
You must be signed in to change notification settings - Fork 99
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
Can't construct a CrsMatrix::HostMirror with its graph's HostMirror #917
Comments
@brian would it make more sense to create a using matrix_type = KokkosSparse::CrsMatrix<double, int, device_t, void, size_t>;
using matrix_mirror_type = typename matrix_type::mirror_type;
matrix_type Amat(...);
matrix_mirror_type Amat_mirror("maybe a label?", Amat); |
@lucbv That would be possible. It would definitely need the label or some other argument to disambiguate from the existing (shallow) copy constructor. |
But because of the way Tpetra separates the graph and matrix, we still need to support the original case in this reproducer |
Fix #917: ctor CrsMat mirror with CrsGraph mirror
@brian-kelley Thank you for this fix! What is the best way to get this work into our Trilinos UVM refactor branches? |
@kddevin we simply need to make a PR to Trilinos with these two files, since they are already merged in Kokkos Kernels develop the next release of Kokkos/Kokkos Kernels will not erase the changes and would be transparent with respect to these changes. |
Sounds great, @lucbv ! Thanks. |
kokkos/kokkos-kernels#917 and a scoping fix
Also add deep copy constructor for CrsMatrix. Takes a label and any other CrsMatrix<...>, as long as it has same scalar/index/offset types.
It's not always possible to construct a
CrsMatrix::HostMirror
using aCrsMatrix::StaticCrsGraphType::HostMirror
.This is a full reproducer:
In this case, it's because
void
doesn't matchMemoryTraits<0>
, andKokkos::Device<DefaultHostExecutionSpace, HostSpace>
doesn't matchHostSpace
. In both cases, the difference doesn't really matter.The text was updated successfully, but these errors were encountered: