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 <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
This commit is contained in:
Tomeu Vizoso 2024-02-09 14:41:07 +01:00 committed by Marge Bot
parent b143823727
commit e70ea63a17

View file

@ -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;