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

Function is_quant

backends/xnnpack/utils/quant_utils.py:95–100  ·  view source on GitHub ↗
(node: torch.fx.Node)

Source from the content-addressed store, hash-verified

93
94
95def is_quant(node: torch.fx.Node) -> bool:
96 if node.op != "call_function":
97 return False
98 node_name = format_target_name(node.target.__name__) # pyre-ignore
99
100 return node_name in _Q_OPS
101
102
103def is_dequant(node: torch.fx.Node) -> bool:

Callers 15

from_q_dq_nodeMethod · 0.90
from_weightsMethod · 0.90
from_inputsMethod · 0.90
from_outputsMethod · 0.90
callMethod · 0.90
callMethod · 0.90
callMethod · 0.90
get_node_and_depsMethod · 0.90
get_depsMethod · 0.90
_get_output_depsMethod · 0.90
_get_act_depsMethod · 0.90

Calls 1

format_target_nameFunction · 0.90

Tested by 1