Skip to content

Commit

Permalink
onnx2pnnx do not fold single constant for gemm weight (#5634)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Aug 17, 2024
1 parent 789d868 commit 4de5369
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/pnnx/src/pass_onnx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,8 @@ void pass_onnx(const onnx::ModelProto& model, Graph& pnnx_graph)
is_attr_weight = true;
if (sim_op_type == "Gather" && j == 0)
is_attr_weight = true;
if (sim_op_type == "Gemm" && (j == 1 || j == 2))
is_attr_weight = true;
if (sim_op_type == "GroupNormalization" && (j == 1 || j == 2))
is_attr_weight = true;
if (sim_op_type == "GRU" && (j == 1 || j == 2 || j == 3 || j == 5))
Expand Down

0 comments on commit 4de5369

Please sign in to comment.