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

Method pick_representations

backends/vulkan/utils.py:1606–1622  ·  view source on GitHub ↗

For each tensor participating in the op, pick a representation for it among the possible represetntation sets.

(self)

Source from the content-addressed store, hash-verified

1604 return True
1605
1606 def pick_representations(self) -> Tuple[TensorReprList, TensorReprList]:
1607 """
1608 For each tensor participating in the op, pick a representation for it among the
1609 possible represetntation sets.
1610 """
1611 args_repr_list = TensorReprList([])
1612 outs_repr_list = TensorReprList([])
1613
1614 for i in range(len(self.op_node.args)):
1615 arg_repset = self.args_repset_list[i]
1616 args_repr_list.append(arg_repset.make_tensor_repr())
1617
1618 for i in range(num_tensors_in_node(self.op_node)):
1619 out_repset = self.outs_repset_list[i]
1620 outs_repr_list.append(out_repset.make_tensor_repr())
1621
1622 return args_repr_list, outs_repr_list
1623
1624
1625##

Calls 4

appendMethod · 0.95
TensorReprListClass · 0.85
num_tensors_in_nodeFunction · 0.85
make_tensor_reprMethod · 0.80