Constructs a DLManagedTensor WITHOUT data ownership. */
| 218 | |
| 219 | /** Constructs a DLManagedTensor WITHOUT data ownership. */ |
| 220 | inline DLMTensorPtr MakeDLTensor(void *data, DALIDataType type, |
| 221 | bool device, bool pinned, int device_id, |
| 222 | const TensorShape<> &shape, |
| 223 | const TensorShape<> &strides = {}) { |
| 224 | return ToDLMTensor(MakeDLTensorResource(data, type, device, pinned, device_id, shape, strides)); |
| 225 | } |
| 226 | |
| 227 | /** Constructs a DLTensorResource sharing the data ownership. */ |
| 228 | inline auto MakeDLTensorResource(std::shared_ptr<void> data, DALIDataType type, |