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

Function validate_output

backends/arm/test/quantizer/test_set_module_name.py:90–98  ·  view source on GitHub ↗
(node: torch.fx.Node, qspec: QuantizationSpec | None)

Source from the content-addressed store, hash-verified

88
89
90def validate_output(node: torch.fx.Node, qspec: QuantizationSpec | None):
91 if qspec is None:
92 return
93 users = list(node.users)
94 assert len(users) == 1, f"Node {node} should have exactly one user"
95 assert (
96 users[0].target == Q_PER_TENSOR
97 ), f"Output node {users[0]} is not quantized as expected"
98 validate_per_tensor_quant(users[0], qspec)
99
100
101def validate_node(

Callers 1

validate_nodeFunction · 0.85

Calls 1

Tested by

no test coverage detected