diff --git a/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc b/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc index c14c8352b4f..667823aeda8 100644 --- a/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc +++ b/tensorflow/lite/delegates/xnnpack/xnnpack_delegate.cc @@ -859,6 +859,15 @@ class Subgraph { context->tensors, div_params, xnnpack_tensors); } case kTfLiteBuiltinFullyConnected: { + // FullyConnected with sparse weight has version 8, which cannot be + // delegated to XNNPack. + if (registration->version == 8) { + TF_LITE_MAYBE_KERNEL_LOG(logging_context, + "Unsupported version %d of FullyConnected.", + registration->version); + return kTfLiteError; + } + const TfLiteFullyConnectedParams* fc_params = static_cast(node->builtin_data);