@@ -367,6 +367,48 @@ __attribute__((deprecated("This API is experimental.")))
367
367
dataType : (ExecuTorchDataType)dataType
368
368
shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
369
369
370
+ /* *
371
+ * Initializes a tensor using an NSData object as the underlying data buffer with dynamic bound shape.
372
+ *
373
+ * @param data An NSData object containing the tensor data.
374
+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
375
+ * @param strides An NSArray of NSNumber objects representing the tensor's strides.
376
+ * @param dimensionOrder An NSArray of NSNumber objects indicating the order of dimensions.
377
+ * @param dataType An ExecuTorchDataType value specifying the element type.
378
+ * @return An initialized ExecuTorchTensor instance using the provided data.
379
+ */
380
+ - (instancetype )initWithData : (NSData *)data
381
+ shape : (NSArray <NSNumber *> *)shape
382
+ strides : (NSArray <NSNumber *> *)strides
383
+ dimensionOrder : (NSArray <NSNumber *> *)dimensionOrder
384
+ dataType : (ExecuTorchDataType)dataType ;
385
+
386
+ /* *
387
+ * Initializes a tensor using an NSData object as the underlying data buffer, specifying shape, data type, and explicit shape dynamism.
388
+ *
389
+ * @param data An NSData object containing the tensor data.
390
+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
391
+ * @param dataType An ExecuTorchDataType value specifying the element type.
392
+ * @param shapeDynamism An ExecuTorchShapeDynamism value indicating the shape dynamism.
393
+ * @return An initialized ExecuTorchTensor instance using the provided data.
394
+ */
395
+ - (instancetype )initWithData : (NSData *)data
396
+ shape : (NSArray <NSNumber *> *)shape
397
+ dataType : (ExecuTorchDataType)dataType
398
+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism ;
399
+
400
+ /* *
401
+ * Initializes a tensor using an NSData object as the underlying data buffer, specifying only the shape and data type.
402
+ *
403
+ * @param data An NSData object containing the tensor data.
404
+ * @param shape An NSArray of NSNumber objects representing the tensor's shape.
405
+ * @param dataType An ExecuTorchDataType value specifying the element type.
406
+ * @return An initialized ExecuTorchTensor instance using the provided data.
407
+ */
408
+ - (instancetype )initWithData : (NSData *)data
409
+ shape : (NSArray <NSNumber *> *)shape
410
+ dataType : (ExecuTorchDataType)dataType ;
411
+
370
412
@end
371
413
372
414
NS_ASSUME_NONNULL_END
0 commit comments