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

Method get_anchors

backends/nxp/quantizer/patterns.py:289–302  ·  view source on GitHub ↗
(
        self, gm: fx.GraphModule, fused_partition: list[fx.GraphModule]
    )

Source from the content-addressed store, hash-verified

287 return [torch.ops.aten.add.Tensor]
288
289 def get_anchors(
290 self, gm: fx.GraphModule, fused_partition: list[fx.GraphModule]
291 ) -> PartitionAnchors | None:
292 node = fused_partition[0].nodes[-1]
293 inputs = [(node, NodeArgsIdx(0))]
294 if len(fused_partition[0].input_nodes) == 2:
295 inputs = [(node, NodeArgsIdx(0)), (node, NodeArgsIdx(1))]
296
297 return PartitionAnchors(
298 inputs=inputs,
299 weights=[],
300 biases=[],
301 output=[(node,)],
302 )
303
304
305class BMMPattern(QuantizationPattern):

Callers

nothing calls this directly

Calls 2

NodeArgsIdxClass · 0.85
PartitionAnchorsClass · 0.70

Tested by

no test coverage detected