@@ -173,6 +173,21 @@ __attribute__((deprecated("This API is experimental.")))
173173 error:(NSError **)error
174174 NS_SWIFT_NAME (execute(_:_:));
175175
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+
176191/* *
177192 * Executes the "forward" method with the provided input values.
178193 *
@@ -210,7 +225,7 @@ __attribute__((deprecated("This API is experimental.")))
210225- (nullable NSArray <ExecuTorchValue *> *)forward:(NSError **)error;
211226
212227/* *
213- * Executes the "forward" method with no inputs .
228+ * Executes the "forward" method with the provided input tensors .
214229 *
215230 * This is a convenience method that calls the executeMethod with "forward" as the method name.
216231 *
@@ -222,6 +237,19 @@ __attribute__((deprecated("This API is experimental.")))
222237 error:(NSError **)error
223238 NS_SWIFT_NAME (forward(_:));
224239
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+
225253+ (instancetype )new NS_UNAVAILABLE;
226254- (instancetype )init NS_UNAVAILABLE;
227255
0 commit comments