RESHAPE: OP is supported, but tensor type/shape isn't compatible
@Ramees025,
Could you please provide complete code and more information about the issue which was mentioned. It helps to analyse the issue in an effective way. Thank you! ![image](https://github.com/tensorflow/tensorflow/assets/15998417/9b125b2a-acf3-4f29-81bf-3be83af466be)

Attached is the single layer model causing the issue when running in GPU. Model run fine in CPU. But while running with GPU, it showing the error "RESHAPE: OP is supported, but tensor type/shape isn't compatible" and fallback to CPU.
Basically the reshape will convert 5D tensor to 4D tensor. @Ramees025,
Unfortunately with the above details provided, we were not able to provide the correct information. Could you please provide the complete code or the colab gist which helps us to debug the issue in an effective way. Thank you! TfLiteIntArray* GetOpsToReplace(
    TfLiteContext* context, bool allow_quant_ops, int max_delegated_partitions,
    const absl::flat_hash_set<TfLiteBuiltinOperator>* excluded_ops) {
  delegates::IsNodeSupportedFn node_supported_fn =
      [=](TfLiteContext* context, TfLiteNode* node,
          TfLiteRegistration* registration,
          std::string* unsupported_details) -> bool {
    const auto status =
        IsSupported(context, node, registration, allow_quant_ops, excluded_ops);
    if (!status.ok()) {
      if (unsupported_details) {
        *unsupported_details = std::string(status.message());
      }
      return false;
    }
    std::vector<TfLiteType> allowed_in_types = {kTfLiteFloat32, kTfLiteFloat16};
    std::vector<TfLiteType> allowed_out_types = {kTfLiteFloat32,
                                                 kTfLiteFloat16};
    if (!IsAllAllowedTensors(context, node->inputs, allowed_in_types) ||
        !IsAllAllowedTensors(context, node->outputs, allowed_out_types)) {
      if (unsupported_details) {
        *unsupported_details =
            **"OP is supported, but tensor type/shape isn't compatible.";**
      }
      return false;
    }
    return true;
  };
}


code:

\tensorflow\lite\delegates\gpu\common\model_builder.cc

 Hi @Ramees025 

The Reshape op might not be supporting the 5D tensors on GPU delegate which is why the error is thrown. 

Thanks. Hi, is there any plan/roadmap to support 5D RESHAPE ops in tflite gpu delegate? Hi @Ramees025 

The the support for 5D might be on roadmap of Reshape.

 You can also use [Model Analyzer](https://www.tensorflow.org/lite/guide/model_analyzer) to check the [GPU delegate](https://www.tensorflow.org/lite/performance/gpu) compatibility of the given model by providing `gpu_compatibility=True` option.

Thanks.
 This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60793">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60793">No</a>

**System information**
- OS Platform and Distribution: Android, Galaxy S23.
- TensorFlow installed from (source or binary):2.12
- TensorFlow version (or github SHA if from source):2.12


Input tensor shape (1,16,32,256,12)
Output tensor shape (1,16,32,3072)

**Any other info / logs**:

RESHAPE: OP is supported, but tensor type/shape isn't compatible