furiosa.quantizer.frontend.onnx.spec package
Submodules
furiosa.quantizer.frontend.onnx.spec.export_spec module
- class furiosa.quantizer.frontend.onnx.spec.export_spec.OnnxExportSpec(model: onnx.onnx_ml_pb2.ModelProto)
Bases:
furiosa.quantizer.interfaces.export_spec.ExportSpec
- add(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- avgpool2d(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- clip(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- concatenation(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- conv2d(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- convtranspose2d(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- depthtospace(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- div(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- exp(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- expand(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- export() Tuple[List[furiosa.quantizer.ir.spec.OperatorSpec], Set[str]]
Traverse graph and export nodes as specs. Returns (a list of Spec, a set of unsupported ops)
- flatten(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- gelu(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- gemm(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- static get_attributes(model: onnx.onnx_ml_pb2.ModelProto) Dict[str, Dict[str, int]]
- get_initializer_for_gen_spec(input_name: str) List[int]
- get_inputs_for_gen_spec(node: onnx.onnx_ml_pb2.NodeProto) Tuple[List[Tuple[int]], List[Tuple[int]], Dict]
- static get_tensor_shapes(model: onnx.onnx_ml_pb2.ModelProto) Dict[str, Tuple[int]]
- layer_norm(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- lp_norm(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- matmul(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- maxpool2d(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- mul(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- multi_node_lp_norm(node: onnx.onnx_ml_pb2.NodeProto) Optional[Tuple[furiosa.quantizer.ir.spec.Spec, List[str]]]
Starts from ‘Div’, traverse up to find the form of l2norm. Returns all inputs of l2norm, consist of multi node
LpNormalization is not defined in ONNX Operator spec, so that we should traverse the graph:
- Input –> ReduceL2 –> Clip –> Expand –> D
———————————–> iv –> Output
- property multi_node_spec: Dict[str, List[Callable[[onnx.onnx_ml_pb2.NodeProto], Optional[Tuple[furiosa.quantizer.ir.spec.Spec, List[str]]]]]]
- pad(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- reduce_l2(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- reduce_mean(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- reduce_sum(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- reshape(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- resize(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- sigmoid(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- property single_node_spec: Dict[str, Callable[[onnx.onnx_ml_pb2.NodeProto], furiosa.quantizer.ir.spec.Spec]]
- property skip_node: Set[str]
- slice(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- softmax(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- softplus(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- split(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- squeeze(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- sub(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- transpose(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
- traverse_multi_node_spec(node: onnx.onnx_ml_pb2.NodeProto) Optional[Tuple[furiosa.quantizer.ir.spec.Spec, List[str]]]
Returns (Spec, list of inputs of the node)
- traverse_single_node_spec(node: onnx.onnx_ml_pb2.NodeProto) Optional[Tuple[furiosa.quantizer.ir.spec.Spec, List[str]]]
Returns (Spec, list of inputs of the node)
- unsqueeze(node: onnx.onnx_ml_pb2.NodeProto) furiosa.quantizer.ir.spec.Spec
furiosa.quantizer.frontend.onnx.spec.spec_utils module
- furiosa.quantizer.frontend.onnx.spec.spec_utils.gemm_shapes(input_shapes, transA, transB)
- furiosa.quantizer.frontend.onnx.spec.spec_utils.horizontal_pads(f1, f2, f3, f4, s1, s2, s3, s4)
- furiosa.quantizer.frontend.onnx.spec.spec_utils.implicit_axis_to_explicit(axes, input_shape)
- furiosa.quantizer.frontend.onnx.spec.spec_utils.node_identifier(node: onnx.onnx_ml_pb2.NodeProto) str
In the case of onnx, FuriosaAI uses the first output node’s name as a node identifier.
- furiosa.quantizer.frontend.onnx.spec.spec_utils.slice_offset_dict(starts, axes, input_shape)