tracel-ai / burn

Burn is a new comprehensive dynamic Deep Learning Framework built using Rust with extreme flexibility, compute efficiency and portability as its primary goals.
https://burn.dev
Apache License 2.0
8.65k stars 430 forks source link

Feature Request: Full Gemm operation / node #2049

Open mtobin-tdab opened 2 months ago

mtobin-tdab commented 2 months ago

Feature description

Introduction of ONNX Gemm operation conversion https://onnx.ai/onnx/operators/onnx__Gemm.html

Feature motivation

Useful for optimisations

Currently get:

DEBUG onnx_ir::proto_conversion: Converting ONNX node with type "Gemm"    
DEBUG onnx_ir::from_onnx: renaming node "model/..../dense/MatMul_Gemm__6"    
ERROR burn_import::logger: PANIC => panicked at crates/onnx-ir/src/coalesce.rs:55:9:
Full Gemm node not supported yet. 
antimora commented 2 months ago

Thanks for filing. Definitely useful to support Gemm ONNX operator. However, you mentioned it's useful for optimization, what do you mean? So you know, Burn does not have native Gemm operator. So any ONNX Gemm operator translation will be to the Burn APIs. And I don't think we have any plans for Gemm anytime soon, unless @louisfd and @nathanielsimard know better.