MCPcopy Create free account
hub / github.com/NVIDIA/DALI / TensorListToDLPackView

Function TensorListToDLPackView

dali/util/pybind.h:226–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225template <typename Backend>
226py::list TensorListToDLPackView(TensorList<Backend> &tensors) {
227 py::list result;
228 auto dl_tensors = GetDLTensorListView(tensors);
229 for (DLMTensorPtr &dl_tensor : dl_tensors) {
230 result.append(DLTensorToCapsule(std::move(dl_tensor)));
231 }
232 return result;
233}
234
235static DLManagedTensor* DLMTensorRawPtrFromCapsule(py::capsule &capsule, bool consume = true) {
236 DALI_ENFORCE(std::string(capsule.name()) == DLTENSOR_NAME,

Calls 3

GetDLTensorListViewFunction · 0.85
DLTensorToCapsuleFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected