@@ -244,6 +244,48 @@ __attribute__((deprecated("This API is experimental.")))
244244 dataType : (ExecuTorchDataType)dataType
245245 shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
246246
247+ /* *
248+ * Initializes a tensor by copying bytes from the provided pointer with dynamic bound shape.
249+ *
250+ * @param pointer A pointer to the source data buffer.
251+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
252+ * @param strides An NSArray of NSNumber objects representing the tensor's strides.
253+ * @param dimensionOrder An NSArray of NSNumber objects indicating the order of dimensions.
254+ * @param dataType An ExecuTorchDataType value specifying the element type.
255+ * @return An initialized ExecuTorchTensor instance with its own copy of the data.
256+ */
257+ - (instancetype )initWithBytes : (const void *)pointer
258+ shape : (NSArray <NSNumber *> *)shape
259+ strides : (NSArray <NSNumber *> *)strides
260+ dimensionOrder : (NSArray <NSNumber *> *)dimensionOrder
261+ dataType : (ExecuTorchDataType)dataType ;
262+
263+ /* *
264+ * Initializes a tensor by copying bytes from the provided pointer, specifying shape, data type, and explicit shape dynamism.
265+ *
266+ * @param pointer A pointer to the source data buffer.
267+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
268+ * @param dataType An ExecuTorchDataType value specifying the element type.
269+ * @param shapeDynamism An ExecuTorchShapeDynamism value indicating the shape dynamism.
270+ * @return An initialized ExecuTorchTensor instance with its own copy of the data.
271+ */
272+ - (instancetype )initWithBytes : (const void *)pointer
273+ shape : (NSArray <NSNumber *> *)shape
274+ dataType : (ExecuTorchDataType)dataType
275+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
276+
277+ /* *
278+ * Initializes a tensor by copying bytes from the provided pointer, specifying only the shape and data type.
279+ *
280+ * @param pointer A pointer to the source data buffer.
281+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
282+ * @param dataType An ExecuTorchDataType value specifying the element type.
283+ * @return An initialized ExecuTorchTensor instance with its own copy of the data.
284+ */
285+ - (instancetype )initWithBytes : (const void *)pointer
286+ shape : (NSArray <NSNumber *> *)shape
287+ dataType : (ExecuTorchDataType)dataType ;
288+
247289@end
248290
249291NS_ASSUME_NONNULL_END
0 commit comments