diff --git a/tools/pnnx/Releasenotes b/tools/pnnx/Releasenotes index 255e5ca5074..8b59012219b 100644 --- a/tools/pnnx/Releasenotes +++ b/tools/pnnx/Releasenotes @@ -100,4 +100,7 @@ dev.1.0.26.20240723 5. Fix torch.unbind dev.1.0.27.20240725 -1. Fix bug of fold constants sub graph pass in pass level5 \ No newline at end of file +1. Fix bug of fold constants sub graph pass in pass level5 + +dev.1.0.28.20240730 +1. set torch.arange node to attribute_node_list in fold_constants_sub_graph pass \ No newline at end of file diff --git a/tools/pnnx/src/pass_level5/fold_constants_sub_graph.cpp b/tools/pnnx/src/pass_level5/fold_constants_sub_graph.cpp index 99f8508f7d5..93dd09ef840 100644 --- a/tools/pnnx/src/pass_level5/fold_constants_sub_graph.cpp +++ b/tools/pnnx/src/pass_level5/fold_constants_sub_graph.cpp @@ -33,13 +33,14 @@ void fold_constants_sub_graph(std::shared_ptr graph) for(size_t i = 0; i < graph->ops.size(); i++) { Operator* cur_op = graph->ops[i]; - if (cur_op->type == "pnnx.Attribute") + if (cur_op->type == "pnnx.Input") { - attribute_node_list.push(cur_op); + input_node_list.push(cur_op); } - else if(cur_op->type == "pnnx.Input" || cur_op->inputs.size() == 0) + else if(cur_op->type == "pnnx.Attribute" || cur_op->inputs.size() == 0) { - input_node_list.push(cur_op); + + attribute_node_list.push(cur_op); } } diff --git a/tools/pnnx/src/py_proj.cpp b/tools/pnnx/src/py_proj.cpp index b8e1f0b7a08..c002e5c70ce 100644 --- a/tools/pnnx/src/py_proj.cpp +++ b/tools/pnnx/src/py_proj.cpp @@ -5,7 +5,7 @@ // #include #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) -#define MYLIBRARY_VERSION "dev.1.0.27.20240725" +#define MYLIBRARY_VERSION "dev.1.0.28.20240730" using namespace pnnx_graph; using namespace pnnx_ir; namespace py = pybind11;