You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached model succeeds when onnxruntime optimization are disabled, and fails when all of them are.
File "onnxruntime/capi/onnxruntime_inference_collection.py", line 491, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Node (MatMulBnFusion_Gemm) Op (Gemm) [ShapeInferenceError] First input does not have rank 2
Activity
xadupre commentedon Nov 6, 2024
The issue is here: https://github.com/microsoft/onnxruntime/blob/main/onnxruntime/core/optimizer/matmul_bn_fusion.cc#L207. A Gemm operator is introduced to fuse
Add(MatMul(X,Y), Z)intoGemm(X,Y,Z). In my case, it fails becauserank(X) == 3andrank(Y) == 2which is not allowed by this kernel.Fix MatMulBnFusion to exclude cases when tensors are not 2D tensors (#…
Fix MatMulBnFusion to exclude cases when tensors are not 2D tensors (#…
Fix MatMulBnFusion to exclude cases when tensors are not 2D tensors (m…
Fix MatMulBnFusion to exclude cases when tensors are not 2D tensors (m…
merge to 1b60209