kornia / kornia-rs

Low-level Computer Vision library in Rust

Home Page:https://docs.rs/kornia-rs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verify that pyo3 transfer the ownership of the data to python

edgarriba opened this issue · comments

we want move semantics to happen and avoid copies around the tensor data. @strasdat any thoughts here ?

Context about how we do it now: https://github.com/kornia/kornia-rs/blob/main/src/dlpack_py.rs#L27-L62

It's done via python capsules to match compatibility with dl frameworks implementing dlpack.
See also: https://github.com/kornia/dlpack-rs

However, for some reason i was suggested by some one from the pyo3 community to avoid pycapsules :)

I think, the first step could be get more information about why pycapsules is not a good practice...