Steal a DLPack Tensor from the passed pointer and wrap it into Python capsule.
| 212 | |
| 213 | // Steal a DLPack Tensor from the passed pointer and wrap it into Python capsule. |
| 214 | static py::capsule DLTensorToCapsule(DLMTensorPtr dl_tensor) { |
| 215 | auto caps = py::capsule(dl_tensor.release(), DLTENSOR_NAME, &DLTensorCapsuleDestructor); |
| 216 | return caps; |
| 217 | } |
| 218 | |
| 219 | template <typename Backend> |
| 220 | py::capsule TensorToDLPackView(SampleView<Backend> tensor, bool pinned, int device_id) { |
no test coverage detected