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

Method addConst

backends/arm/test/misc/test_process_node.py:37–43  ·  view source on GitHub ↗
(self, shape, dtype, values, name)

Source from the content-addressed store, hash-verified

35 self.serialized_bytes = None
36
37 def addConst(self, shape, dtype, values, name):
38 self.shape = shape
39 self.dtype = dtype
40 self.values = np.asarray(values)
41 self.name = name
42 if dtype == ts.DType.INT48:
43 self.serialized_bytes = self._serialize_int48(self.values)
44
45 @staticmethod
46 def _serialize_int48(values: np.ndarray) -> list[int]:

Callers 12

define_nodeMethod · 0.80
define_nodeMethod · 0.80
define_nodeMethod · 0.80
define_nodeMethod · 0.80
define_nodeMethod · 0.80
broadcast_tensorsFunction · 0.80
build_reshape_tosaFunction · 0.80

Calls 1

_serialize_int48Method · 0.95

Tested by

no test coverage detected