@@ -156,6 +156,48 @@ __attribute__((deprecated("This API is experimental.")))
156156 dataType : (ExecuTorchDataType)dataType
157157 shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
158158
159+ /* *
160+ * Initializes a tensor without copying data using dynamic bound shape (default strides and dimension order).
161+ *
162+ * @param pointer A pointer to the data buffer.
163+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
164+ * @param strides An NSArray of NSNumber objects representing the tensor's strides.
165+ * @param dimensionOrder An NSArray of NSNumber objects indicating the order of dimensions.
166+ * @param dataType An ExecuTorchDataType value specifying the element type.
167+ * @return An initialized ExecuTorchTensor instance.
168+ */
169+ - (instancetype )initWithBytesNoCopy : (void *)pointer
170+ shape : (NSArray <NSNumber *> *)shape
171+ strides : (NSArray <NSNumber *> *)strides
172+ dimensionOrder : (NSArray <NSNumber *> *)dimensionOrder
173+ dataType : (ExecuTorchDataType)dataType ;
174+
175+ /* *
176+ * Initializes a tensor without copying data, with an explicit shape dynamism.
177+ *
178+ * @param pointer A pointer to the data buffer.
179+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
180+ * @param dataType An ExecuTorchDataType value specifying the element type.
181+ * @param shapeDynamism An ExecuTorchShapeDynamism value indicating the shape dynamism.
182+ * @return An initialized ExecuTorchTensor instance.
183+ */
184+ - (instancetype )initWithBytesNoCopy : (void *)pointer
185+ shape : (NSArray <NSNumber *> *)shape
186+ dataType : (ExecuTorchDataType)dataType
187+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
188+
189+ /* *
190+ * Initializes a tensor without copying data, specifying only the shape and data type.
191+ *
192+ * @param pointer A pointer to the data buffer.
193+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
194+ * @param dataType An ExecuTorchDataType value specifying the element type.
195+ * @return An initialized ExecuTorchTensor instance.
196+ */
197+ - (instancetype )initWithBytesNoCopy : (void *)pointer
198+ shape : (NSArray <NSNumber *> *)shape
199+ dataType : (ExecuTorchDataType)dataType ;
200+
159201@end
160202
161203NS_ASSUME_NONNULL_END
0 commit comments