From e70ea63a179531b041b60d7f2fc0158658a7efb8 Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Fri, 9 Feb 2024 14:41:07 +0100 Subject: [PATCH] teflon: Enable convolutions with number of output channels not divisible by 8 This was an old restriction during initial development which isn't needed any more, and gives us a speed bump. Reviewed-by: Philipp Zabel Part-of: --- src/gallium/frontends/teflon/tfl_device.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/frontends/teflon/tfl_device.c b/src/gallium/frontends/teflon/tfl_device.c index 899a7121627..dc620cfcea4 100644 --- a/src/gallium/frontends/teflon/tfl_device.c +++ b/src/gallium/frontends/teflon/tfl_device.c @@ -368,15 +368,7 @@ PrepareDelegate(TfLiteContext *context, TfLiteDelegate *delegate) switch(registration->builtin_code) { case kTfLiteBuiltinConv2d: - case kTfLiteBuiltinDepthwiseConv2d: { - TfLiteTensor bias_tensor = context->tensors[node->inputs->data[2]]; - /* Skip out channel numbers that the HW doesn't support */ - if (bias_tensor.dims->data[0] > 8 && bias_tensor.dims->data[0] % 8 != 0) - supported = false; - else - supported = true; - break; - } + case kTfLiteBuiltinDepthwiseConv2d: case kTfLiteBuiltinAdd: supported = true; break;