Closed erelon closed 1 year ago
@erelon The rank of Matmul
input tensor must be 2
when using fuse_matmul_add_bias_into_gemm
, you can find it in source https://github.com/onnx/optimizer/blob/master/onnxoptimizer/passes/fuse_matmul_add_bias_into_gemm.h#L60
In Gemm defination, The shape of A should be (M,K) or (K,M), and the shape of B should be (K,N) or (N,K).
Hi,
When using fuse_matmul_add_bias_into_gemm I expect that even with batch size the layers will fuse. Apparently, this is not supported. I can't see what is the reason for this. If there is a problem with more then one batch, the fuse can happen at least when the batch size dim is 1.
Here is the example code to create this issue (heavily based on #58):