[RNN] TFLite fails to convert LSTM to 16x8 quantization
This feature would for sure be greatly appreciated @blaine-fs  Thanks for reporting the issue.

I was able to reproduce this issue in TF 2.11 and TF Nightly 2.13.0-dev20230208 as well. Please find the gist [here](https://colab.research.google.com/gist/pjpratik/e5adb100f2d167e3eacd07aacf743512/59626.ipynb#scrollTo=L7bc0aqcGZCX). 

A similar issue can be found in [#55267](https://github.com/tensorflow/tensorflow/issues/55267).

@sachinprasadhs Can you please look into this. Thank you. Hi folks, this is an important issue for one the MLPerf working groups. If y'all could please resolve it would be very much appreciated. Feel free to ping me at petermattson@ if you need more background. Many thanks! :-) We ran into this as well. Intuitively, it looks like audio generation in general will run into perceptual issues at 8 bits. @sachinprasadhs @pjpratik do you have any updates on this? Is it on the roadmap for TFLite? Just wanted to gently nudge @arfaian as well. I just noticed this ticket was reassigned. Just wanted to update everyone on this. I was able to compile the example after merging this [PR](https://github.com/tucan9389/tensorflow/pull/1) from @tucan9389. This is a huge help to both the MLPerf tiny committee as well as a number of HW startups' internal efforts. Is there anything we can do to help get this merged into master, even if it's just an experimental flag? Hi all, I wanted to share a further update on the usefulness of 16x8 mode. 

Here are some results experimenting with an LSTM-based keyword spotting model in both 8x8 and 16x8 precision, compared to the Keras floating point baseline. As you can see, 8x8 mode suffers considerable accuracy degradation, while 16x8 yields results very close to the baseline. 16x8 quantization was achieved using the above PR.

![image](https://user-images.githubusercontent.com/110433039/230952662-798049ca-a162-4f4f-9a48-2355160bcbfa.png)


Terminology: F1 is the usual classification accuracy metric. FPR = "false positive rate", FNR = "false negative rate", FA/hr = "false acceptance / hour", a metric used for keyword spotting.

In my mind, this is strong evidence that 16x8 mode is necessary to recover full accuracy for some models. Hello. I have also built tensorflow using the lite/16x8-mlir-quantizer-base branch. However, I am still getting an issue about the unsupported inference_output_type as seen in the picture
![tflite_lstm](https://user-images.githubusercontent.com/23378874/234510063-4d3720a1-f65b-4981-b63d-10a5b06cb2e0.PNG)

On the other side. If I change the input and output types to tf.int8, I get the error that 
ValueError: The inference_input_type and inference_output_type must be in ['tf.float32', 'tf.int16'].

The lite.py and convert.py files in the tensorflow/lite/python path, are identical with the PR

Any help would be appreciated!
 @anasvaf have you tried using `tf.int16` for both the input and output dtype? @pjpratik  I am pleased to report that this issue seems to be fixed in TF 2.13! At least, I was able to get it to work so long as the RNNs use `unroll=True`.  @blaine-fs , Good to know that your issue is resolved, could you please spare some time to close this issue as well. Thank you! Closing due to feature added in TF 2.13 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/59626">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/59626">No</a>

Hi, the [MLPerf Tiny](https://mlcommons.org/en/news/mlperf-tiny-v05/) working group would like to implement a streaming LSTM benchmark for audio speech enhancement, based on this [paper](https://arxiv.org/abs/2005.11138). Since audio playback typically uses 16 bits per sample, it seems like any ML model synthesizing audio will need to use 16-bit activations. However, TFLite does not seem to support 16x8 quantization for LSTMs. Please see the colab below which shows a streaming LSTM model successfully converting to TFLite in 8x8 mode, but not in 16x8 mode.

Is there any way to work around this problem and get 16-bit activations out of an LSTM? This would be hugely impactful for the embedded audio community.

### 1. System information

- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 22.04
- TensorFlow installation (pip package or built from source): `pip install tensorflow-cpu`
- TensorFlow library (version, if pip package or github SHA, if built from source): 2.11.0

### 2. Code

https://colab.research.google.com/drive/1mQq7yqqwH6HjgOTSxTU0I_SMA1XIZ2XM?usp=sharing

### 3. Failure after conversion

> RuntimeError: Max and min for dynamic tensors should be recorded during calibration: Failed for tensor arg1
> Empty min/max for tensor arg1
