MCPcopy
hub / github.com/apache/tvm / call_packed

Method call_packed

python/tvm/runtime/disco/session.py:210–236  ·  view source on GitHub ↗

Call a PackedFunc on workers providing variadic arguments. Parameters ---------- func : PackedFunc The function to be called. *args : various types In the variadic arguments, the supported types include: - integers and floating poi

(self, func: DRef, *args)

Source from the content-addressed store, hash-verified

208 self._import_python_module(module_name)
209
210 def call_packed(self, func: DRef, *args) -> DRef:
211 """Call a PackedFunc on workers providing variadic arguments.
212
213 Parameters
214 ----------
215 func : PackedFunc
216 The function to be called.
217 *args : various types
218 In the variadic arguments, the supported types include:
219 - integers and floating point numbers;
220 - DLDataType;
221 - DLDevice;
222 - str (std::string in C++);
223 - DRef.
224
225 Returns
226 -------
227 return_value : various types
228 The return value of the function call.
229
230 Notes
231 -----
232 Examples of unsupported types:
233 - Tensor, DLTensor,;
234 - TVM Objects, including PackedFunc, Module and String.
235 """
236 return _ffi_api.SessionCallPacked(self, 0, 0, func, *args) # type: ignore # pylint: disable=no-member
237
238 def _sync_worker(self, worker_id: int) -> None:
239 """Synchronize the controller with a worker, and it will wait until the worker finishes

Callers 15

matmulFunction · 0.80
batch_matmulFunction · 0.80
matmulFunction · 0.80
batch_matmulFunction · 0.80
conv_forwardFunction · 0.80
conv_backward_dataFunction · 0.80
conv_backward_filterFunction · 0.80
softmaxFunction · 0.80
log_softmaxFunction · 0.80
convolution_inferenceFunction · 0.80

Calls

no outgoing calls

Tested by 15

test_sortFunction · 0.64
test_sort_npFunction · 0.64
addMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
main_transform_paramsMethod · 0.64