From 08f1655ec4e8817df0c403ef73631c53dfa9d1c4 Mon Sep 17 00:00:00 2001 From: cyLi-Tiger <2017202049@ruc.edu.cn> Date: Sun, 29 Oct 2023 14:06:41 +0800 Subject: [PATCH] update ConvKernel isAvailable checking --- compiler/lib/KernelGen/Common/ConvKernel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/lib/KernelGen/Common/ConvKernel.h b/compiler/lib/KernelGen/Common/ConvKernel.h index f58c25ac..b5c962eb 100644 --- a/compiler/lib/KernelGen/Common/ConvKernel.h +++ b/compiler/lib/KernelGen/Common/ConvKernel.h @@ -14,7 +14,7 @@ class ConvImpl : public KernelFunc { static bool is_channel_broadcast_bias(TContext* ctx) { if (is_bias(ctx)) { CCOperand bias = ctx->getAttrOprand("operand:2"); - return bias.shape[0] == 1 && bias.shape[2] == 1 && bias.shape[3] == 1; + return (bias.shape[0] == 1 && bias.shape[2] == 1 && bias.shape[3] == 1) || bias.shape.size() == 1; } return false; }