@@ -173,6 +173,21 @@ __attribute__((deprecated("This API is experimental.")))
173
173
error:(NSError **)error
174
174
NS_SWIFT_NAME (execute(_:_:));
175
175
176
+ /* *
177
+ * Executes a specific method with the provided single input tensor.
178
+ *
179
+ * The method is loaded on demand if not already loaded.
180
+ *
181
+ * @param methodName A string representing the method name.
182
+ * @param tensor An ExecuTorchTensor object representing the input.
183
+ * @param error A pointer to an NSError pointer that is set if an error occurs.
184
+ * @return An NSArray of ExecuTorchValue objects representing the outputs, or nil in case of an error.
185
+ */
186
+ - (nullable NSArray <ExecuTorchValue *> *)executeMethod:(NSString *)methodName
187
+ withTensor:(ExecuTorchTensor *)tensor
188
+ error:(NSError **)error
189
+ NS_SWIFT_NAME (execute(_:_:));
190
+
176
191
/* *
177
192
* Executes the "forward" method with the provided input values.
178
193
*
@@ -210,7 +225,7 @@ __attribute__((deprecated("This API is experimental.")))
210
225
- (nullable NSArray <ExecuTorchValue *> *)forward:(NSError **)error;
211
226
212
227
/* *
213
- * Executes the "forward" method with no inputs .
228
+ * Executes the "forward" method with the provided input tensors .
214
229
*
215
230
* This is a convenience method that calls the executeMethod with "forward" as the method name.
216
231
*
@@ -222,6 +237,19 @@ __attribute__((deprecated("This API is experimental.")))
222
237
error:(NSError **)error
223
238
NS_SWIFT_NAME (forward(_:));
224
239
240
+ /* *
241
+ * Executes the "forward" method with the provided single input tensor.
242
+ *
243
+ * This is a convenience method that calls the executeMethod with "forward" as the method name.
244
+ *
245
+ * @param tensor An ExecuTorchTensor object representing the input.
246
+ * @param error A pointer to an NSError pointer that is set if an error occurs.
247
+ * @return An NSArray of ExecuTorchValue objects representing the outputs, or nil in case of an error.
248
+ */
249
+ - (nullable NSArray <ExecuTorchValue *> *)forwardWithTensor:(ExecuTorchTensor *)tensor
250
+ error:(NSError **)error
251
+ NS_SWIFT_NAME (forward(_:));
252
+
225
253
+ (instancetype )new NS_UNAVAILABLE;
226
254
- (instancetype )init NS_UNAVAILABLE;
227
255
0 commit comments