@@ -130,6 +130,49 @@ __attribute__((deprecated("This API is experimental.")))
130130 error:(NSError **)error
131131 NS_SWIFT_NAME (execute(_:_:));
132132
133+ /* *
134+ * Executes a specific method with the provided single input value.
135+ *
136+ * The method is loaded on demand if not already loaded.
137+ *
138+ * @param methodName A string representing the method name.
139+ * @param value An ExecuTorchValue object representing the input.
140+ * @param error A pointer to an NSError pointer that is set if an error occurs.
141+ * @return An NSArray of ExecuTorchValue objects representing the outputs, or nil in case of an error.
142+ */
143+ - (nullable NSArray <ExecuTorchValue *> *)executeMethod:(NSString *)methodName
144+ withInput:(ExecuTorchValue *)value
145+ error:(NSError **)error
146+ NS_SWIFT_NAME (execute(_:_:));
147+
148+ /* *
149+ * Executes a specific method with no input values.
150+ *
151+ * The method is loaded on demand if not already loaded.
152+ *
153+ * @param methodName A string representing the method name.
154+ * @param error A pointer to an NSError pointer that is set if an error occurs.
155+ * @return An NSArray of ExecuTorchValue objects representing the outputs, or nil in case of an error.
156+ */
157+ - (nullable NSArray <ExecuTorchValue *> *)executeMethod:(NSString *)methodName
158+ error:(NSError **)error
159+ NS_SWIFT_NAME (execute(_:));
160+
161+ /* *
162+ * Executes a specific method with the provided input tensors.
163+ *
164+ * The method is loaded on demand if not already loaded.
165+ *
166+ * @param methodName A string representing the method name.
167+ * @param tensors An NSArray of ExecuTorchTensor objects representing the inputs.
168+ * @param error A pointer to an NSError pointer that is set if an error occurs.
169+ * @return An NSArray of ExecuTorchValue objects representing the outputs, or nil in case of an error.
170+ */
171+ - (nullable NSArray <ExecuTorchValue *> *)executeMethod:(NSString *)methodName
172+ withTensors:(NSArray <ExecuTorchTensor *> *)tensors
173+ error:(NSError **)error
174+ NS_SWIFT_NAME (execute(_:_:));
175+
133176+ (instancetype )new NS_UNAVAILABLE;
134177- (instancetype )init NS_UNAVAILABLE;
135178
0 commit comments