未验证 提交 7e583428 编写于 作者: wangq3802's avatar wangq3802 提交者: GitHub

bug : fix op release (#479)

Co-authored-by: Nwangquan <qwang02@openailab.com>
上级 eb0a08ea
......@@ -95,7 +95,6 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(reducel2_param));
}
static int register_reducel2_op(void* arg)
......@@ -112,6 +111,7 @@ static int register_reducel2_op(void* arg)
static int unregister_reducel2_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(reducel2_param));
return unregister_op(OP_REDUCEL2, 1);
}
......
......@@ -232,7 +232,6 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(reduction_param));
}
static int register_reduction_op(void* arg)
......@@ -249,6 +248,7 @@ static int register_reduction_op(void* arg)
static int unregister_reduction_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(reduction_param));
return unregister_op(OP_REDUCTION, 1);
}
......
......@@ -154,7 +154,6 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(squeeze_param));
}
static int register_squeeze_op(void* arg)
......@@ -171,6 +170,7 @@ static int register_squeeze_op(void* arg)
static int unregister_squeeze_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(squeeze_param));
return unregister_op(OP_SQUEEZE, 1);
}
......
......@@ -100,7 +100,6 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(swap_axis_param));
}
static int register_swap_axis_op(void* arg)
......@@ -117,6 +116,7 @@ static int register_swap_axis_op(void* arg)
static int unregister_swap_axis_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(swap_axis_param));
return unregister_op(OP_SWAP_AXIS, 1);
}
......
......@@ -88,7 +88,6 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(topkv2_param));
}
static int register_topkv2_op(void* arg)
......@@ -105,6 +104,7 @@ static int register_topkv2_op(void* arg)
static int unregister_topkv2_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(topkv2_param));
return unregister_op(OP_TOPKV2, 1);
}
......
......@@ -100,8 +100,10 @@ static int init_op(struct ir_op* op)
static void release_op(struct ir_op* op)
{
struct unsqueeze_param* unsqueeze_param = (struct unsqueeze_param*)op->param_mem;
if (unsqueeze_param->axises)
sys_free(unsqueeze_param->axises);
sys_free(op->param_mem);
sys_free(GET_PARAM_PARSE_MAP(unsqueeze_param));
}
static int register_unsqueeze_op(void* arg)
......@@ -118,6 +120,7 @@ static int register_unsqueeze_op(void* arg)
static int unregister_unsqueeze_op(void* arg)
{
sys_free(GET_PARAM_PARSE_MAP(unsqueeze_param));
return unregister_op(OP_UNSQUEEZE, 1);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册