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

Method op_index

examples/apple/coreml/llama/utils.py:51–53  ·  view source on GitHub ↗
(self, in_index, out_index)

Source from the content-addressed store, hash-verified

49 self.ops.append(torch.nn.Linear(s_in, s_out, bias=False))
50
51 def op_index(self, in_index, out_index):
52 idx = out_index * len(self.in_split_sizes) + in_index
53 return idx
54
55 def _get_split_sizes(self, n_features, target_split_size, max_splits):
56 num_splits = max(n_features // target_split_size, 1)

Callers 2

__init__Method · 0.95
forwardMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected