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

Function get_node_visitors

backends/xnnpack/operators/node_visitor.py:748–758  ·  view source on GitHub ↗
(*args)

Source from the content-addressed store, hash-verified

746
747# @lru_cache - TODO enable caching - ATM dict being non hashable is causing issues with LRU cache
748def get_node_visitors(*args) -> Dict[str, NodeVisitor]:
749 node_visitors = {}
750 """
751 Create a new class instance at runtime, and put them in a dict
752 """
753 for target, visitor in _node_visitor_dict.items():
754 assert callable(
755 visitor
756 ), f"Expecting a callable class, but got {visitor} of type {type(visitor)}"
757 node_visitors[target] = visitor(*args)
758 return node_visitors

Callers 1

preprocessMethod · 0.90

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected