File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,13 @@ Expected<TensorBuffer> TensorBuffer::CreateManaged(
6262 return TensorBuffer (tensor_buffer, OwnHandle::kYes );
6363}
6464
65+ Expected<TensorBuffer> TensorBuffer::CreateManaged (
66+ TensorBufferType buffer_type, const RankedTensorType& tensor_type,
67+ size_t buffer_size) {
68+ return CreateManaged (static_cast <LiteRtTensorBufferType>(buffer_type),
69+ tensor_type, buffer_size);
70+ }
71+
6572Expected<TensorBuffer> TensorBuffer::CreateFromHostMemory (
6673 const RankedTensorType& tensor_type, void * host_mem_addr,
6774 size_t buffer_size) {
Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ class TensorBuffer
5757 const Environment& env, TensorBufferType buffer_type,
5858 const RankedTensorType& tensor_type, size_t buffer_size);
5959
60+ // Creates a managed TensorBuffer object in the given buffer type using the
61+ // default environment (if applicable). The returned object is owned by the
62+ // caller.
63+ [[deprecated(" Use the overload that takes Environmnet instead." )]]
64+ static Expected<TensorBuffer> CreateManaged (
65+ TensorBufferType buffer_type, const RankedTensorType& tensor_type,
66+ size_t buffer_size);
67+
6068 [[deprecated(
6169 " Use the overload that takes litert::TensorBufferType instead." )]]
6270 static Expected<TensorBuffer> CreateManaged (
You can’t perform that action at this time.
0 commit comments