-
Notifications
You must be signed in to change notification settings - Fork 94
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
Preserve the executor in generation #1128
Conversation
In the beginning, I just thought we give what user want. I also thought about the multigrid mixing GPU and CPU usage.
if we would like to allow the above mixing usage, what scope should we force to use the same executor? |
My suggestion at the time of the value semantics PR was making the cross-executor copy explicit by putting it into a PreserveExecutor LinOp(Factory) that also avoids the temporary allocation this approach would require at each cross-executor apply call. |
I mean it introduces the copy in creation not during the copy. |
To recap my arguments from last time:
The suggested approach is a natural extension of the Reordered, ScaledReordered, ... design into other Ginkgo functionality (precisions and executors) |
Some algorithms only work on the cpu then they will convert twice in apply and need to take care the data location in implementation if we always force them into gpu. |
closed due to conceptual changes. Now we actually enforce that objects are copied to the right executor. |
This PR will preserve the executor of given LinOp in generation.
clone still moves everything to the same executor.