furiosa.optimizer.frontend.onnx.transformer.experimental package
Submodules
furiosa.optimizer.frontend.onnx.transformer.experimental.eliminate_detection_postprocess module
- class furiosa.optimizer.frontend.onnx.transformer.experimental.eliminate_detection_postprocess.EliminateSSDDetectionPostprocess(ssd_outputs: List)
Bases:
Transformer
from: Softmax -> graph_output to: graph_output
Assume NCHW Input
- transform(model: ModelProto) ModelProto
furiosa.optimizer.frontend.onnx.transformer.experimental.embedding_bag_porting module
- class furiosa.optimizer.frontend.onnx.transformer.experimental.embedding_bag_porting.EmbeddingBagPattern(model, name_nodes=True)
Bases:
ONNXTransformer
Apply to the DLRM model only.
Transform onnx-exported EmbeddingBag graph to be equivalent to torch.EmbeddingBag If not applied on DLRM model, onnx simplifier doesn’t work because transformed embeddingbag can’t handle empty bag.
- pattern_matching(base_node)
- class furiosa.optimizer.frontend.onnx.transformer.experimental.embedding_bag_porting.EmbeddingBagPorting(batch_size: int | None = 128)
Bases:
Transformer
- transform(model: ModelProto) ModelProto
furiosa.optimizer.frontend.onnx.transformer.experimental.fuse_div_for_bert module
- class furiosa.optimizer.frontend.onnx.transformer.experimental.fuse_div_for_bert.FuseDivForBert
Bases:
Transformer
Only works for some BERT Models
- transform(model: ModelProto) ModelProto
- transform_matmul_add(model)
furiosa.optimizer.frontend.onnx.transformer.experimental.reify_conv_for_bert module
- class furiosa.optimizer.frontend.onnx.transformer.experimental.reify_conv_for_bert.ReifyConvForBert
Bases:
Transformer
from: MatMul + Add to: Conv
Assume NCHW Input
- transform(model: ModelProto) ModelProto
- transform_matmul_add(model)