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

Tpetra: CrsMatrixMultiplyOp should not store a local matrix device? #13545

Open
vasylivy opened this issue Oct 22, 2024 · 2 comments
Open

Tpetra: CrsMatrixMultiplyOp should not store a local matrix device? #13545

vasylivy opened this issue Oct 22, 2024 · 2 comments
Labels
pkg: Tpetra type: bug The primary issue is a bug in Trilinos code or tests

Comments

@vasylivy
Copy link

Hi,

CrsMatrixMultiplyOp should not store a local matrix device, just the rcp to the crs matrix and then in the apply calls should get the local matrix device. A consequence of storing the local matrix device is the wrapped dual view host / device use counts will be off for col idxes in non-uvm cuda builds for any user that has CrsMatrixMultiplyOp objs at the same scope as the corresponding local matrix host obj.

Thanks,

Yaro

@vasylivy vasylivy added the type: bug The primary issue is a bug in Trilinos code or tests label Oct 22, 2024
@lucbv
Copy link
Contributor

lucbv commented Oct 29, 2024

I think one issue is that the KokkosSparse::CrsMatrix requires a view and not a dual view like Tpetra stores. How would you suggest to alleviate that constraint?

@vasylivy
Copy link
Author

vasylivy commented Oct 29, 2024

I was thinking of something like the following in the apply(..), assuming this has no perf impact?

      auto localMultiply =
          local_matrix_op_t(std::make_shared<local_matrix_device_type>(
              matrix_->getLocalMatrixDevice()));

this way it would be fine to keep CrsMatrixMultiplyOp as a member and not worry about potential conflicts w/ the hidden dual views as their scope is now limited to the apply(...) call

Yaro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: Tpetra type: bug The primary issue is a bug in Trilinos code or tests
Projects
None yet
Development

No branches or pull requests

2 participants