MCPcopy Create free account
hub / github.com/pytorch/executorch / is_lowered_module

Function is_lowered_module

exir/delegate.py:145–149  ·  view source on GitHub ↗

This function is added to avoid using isinstance(obj, LoweredBackendModule) as it will import LoweredBackendModule, which may cause a circular import.

(obj: Any)

Source from the content-addressed store, hash-verified

143
144 # pyre-ignore: Missing parameter annotation [2]: Parameter `obj` must have a type other than `Any`.Pyre
145 def is_lowered_module(obj: Any) -> bool:
146 """
147 This function is added to avoid using isinstance(obj, LoweredBackendModule) as it will import LoweredBackendModule, which may cause a circular import.
148 """
149 return type(obj).__name__ == LOWERED_BACKEND_MODULE_TYPE
150
151 def get_lowered_module_name(
152 root: torch.nn.Module,

Callers 4

create_argMethod · 0.90
call_functionMethod · 0.90
trace_call_delegateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected