MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __getitem__

Method __getitem__

python/tvm_ffi/module.py:290–294  ·  view source on GitHub ↗

Return function by name using item access (module["func"]).

(self, name: str)

Source from the content-addressed store, hash-verified

288 _ffi_api.ModuleImportModule(self, module)
289
290 def __getitem__(self, name: str) -> core.Function:
291 """Return function by name using item access (module["func"])."""
292 if not isinstance(name, str):
293 raise ValueError("Can only take string as function name")
294 return self.get_function(name)
295
296 def __call__(self, *args: Any) -> Any:
297 """Call the module's entry function (`main`)."""

Callers

nothing calls this directly

Calls 1

get_functionMethod · 0.95

Tested by

no test coverage detected