-
Notifications
You must be signed in to change notification settings - Fork 5
Dual Views managed by Python #91
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
base: main
Are you sure you want to change the base?
Conversation
keepAliveHost to properly handle the situation where the DualView.host_view() is an unmanaged alias of DualView.device_view(), as is the case when executing in Kokkos in SERIAL mode.
…counting of numpy arrays
…lues in examples.
|
I was unable to test these torch examples with the new setup because I don't have torch_mlir installed in my environment: |
|
It's also worth noting that this will be a breaking change for any existing code. We should do a minor version bump. To get access to LAPIS results you now have to call .asnumpy() or .asmemref() on the result object (unless it's a scalar). |
Merge branch 'main' into DualViewMerge
Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
This change still applies since DualView::deallocate still resets impl. Signed-off-by: Brian Kelley <bmkelle@sandia.gov>
Merge in recent main changes into DualViewInPython
|
@jpr-snl I added Patch to update remaining examples: |
Implements DualView class in Python to tie Kokkos View lifespans to python objects. This should eliminate what is effectively a large memory leak, where every LAPIS return value was kept alive until the Python interpreter exits. This change should also allow a significant reduction in Host <-> Device communication by allowing LAPIS results to stay resident within their Kokkos memory space via DualView.
It also fixes some more uninitialized value problems stemming from use of LLVM tensor.empty() in the examples.