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

Method get_anchors

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

Source from the content-addressed store, hash-verified

336 return [torch.ops.aten.sub.Tensor]
337
338 def get_anchors(
339 self, gm: fx.GraphModule, fused_partition: list[fx.GraphModule]
340 ) -> PartitionAnchors | None:
341 node = fused_partition[0].nodes[-1]
342 inputs = [(node, NodeArgsIdx(0))]
343 if len(fused_partition[0].input_nodes) == 2:
344 inputs = [(node, NodeArgsIdx(0)), (node, NodeArgsIdx(1))]
345
346 return PartitionAnchors(
347 inputs=inputs,
348 weights=[],
349 biases=[],
350 output=[(node,)],
351 )
352
353
354class AvgPool1DPattern(SharedSpecPattern):

Callers

nothing calls this directly

Calls 2

NodeArgsIdxClass · 0.85
PartitionAnchorsClass · 0.70

Tested by

no test coverage detected