SimpleShardedDimProto#
- class onnx_light.onnx.SimpleShardedDimProto(*args, **kwargs)#
Indicates that N blocks are divided into M shards. N is allowed to be symbolic where M is required to be a constant.
- CopyFrom(self, arg: onnx_light.onnx_py._onnxpyprotoop.SimpleShardedDimProto, /) None#
Copies one instance into this one.
- HasField(self, field_name: str) bool#
Checks if a field is set, following the protobuf HasField API.
- ParseFromFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Parses a binary file to fill this instance.
- ParseFromString(self, data: bytes, options: object | None = None) None#
- ParseFromString(self, data: str, options: object | None = None) None
Overloaded function.
ParseFromString(self, data: bytes, options: object | None = None) -> None
Parses a sequence of bytes to fill this instance.
ParseFromString(self, data: str, options: object | None = None) -> None
Parses a string to fill this instance.
- SerializeSize(self, options: object | None = None) onnx_light.onnx_py._onnxpyprotoop.SerializeSizeResult#
Returns the size once serialized without serializing.
- SerializeToFile(self, name: str, options: object | None = None, external_data_file: str = '') None#
Serializes this instance into a file. If
external_data_sizeis not empty, big weights are stored in this (depending onoptions.raw_data_threshold). When writing to two files, temporary external-data metadata is cleared so the in-memory model stays unchanged.
- SerializeToFileDescriptor(self, fd: int, options: object | None = None) None#
Serializes this instance into an open file descriptor without closing it.
- SerializeToOStream(self, output: object) None#
Alias for SerializeToOstream (capital S) for protobuf API compatibility. Serializes this instance to a Python file-like object that has a write() method.
- SerializeToOstream(self, output: object) None#
Serializes this instance to a Python file-like object that has a write() method.
- SerializeToString(self, options: object | None = None) bytes#
Serializes this instance into a sequence of bytes.
- property dim_param#
Dimension name to be sharded if it is a dynamic value.
- property dim_value#
Dimension value to be sharded if it is a fixed value.
- property num_shards#
This field MUST be present for this version of the IR. Number of shards to split dim into.