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

blas(axpby): execution space instance semantics not honored #2434

Open
romintomasetti opened this issue Nov 21, 2024 · 0 comments
Open

blas(axpby): execution space instance semantics not honored #2434

romintomasetti opened this issue Nov 21, 2024 · 0 comments

Comments

@romintomasetti
Copy link

Using KokkosBlas::axpby, I could easily get a broken code if both following conditions are met:

  1. use rank-0 views for the coefficients
  2. pass an execution space instance on which these coefficients are being modified by some preceding kernel

The issue is clear if looking e.g. at the following line:

InternalTypeA internal_a(Impl::getScalarValueFromVariableAtHost<AV, Impl::typeRank<AV>()>::getValue(a));

Adding an exec_space.fence() before fetching the value of the rank-0 view fixes it.

As a side node, I think you get potentially other issues, e.g. here

Kokkos::deep_copy(managed_a, a);

where passing exec_space to Kokkos::deep_copy seems necessary.

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

No branches or pull requests

1 participant