iree-org / iree

A retargetable MLIR-based machine learning compiler and runtime toolkit.
http://iree.dev/
Apache License 2.0
2.56k stars 571 forks source link

[TFL] `tfl.lstm` should have a stateful decomposition to other TFLite operations #9190

Open rsuderman opened 2 years ago

rsuderman commented 2 years ago

Some significant models are blocked by tfl.lstm which can be decomposed into already support tflite operations. Adding the decomposition should unblock these models.

/tmp/test.tflite:0:0: note: see current operation: %95 = "tfl.lstm"(%arg0, %44, %42, %41, %40, %44, %39, %38, %37, %44, %44, %44, %44, %92, %91, %90, %36, %44, %89, %88, %44, %87, %86, %85) ({
}) {asymmetric_quantize_inputs = false, cell_clip = 1.000000e+01 : f32, fused_activation_function = "TANH", kernel_type = "FULL", proj_clip = 0.000000e+00 : f32} : (tensor<1x1280xf32>, none, tensor<2048x1280xi8>, tensor<2048x1280xi8>, tensor<2048x1280xi8>, none, tensor<2048x640xi8>, tensor<2048x640xi8>, tensor<2048x640xi8>, none, none, none, none, tensor<2048xf32>, tensor<2048xf32>, tensor<2048xf32>, tensor<640x2048xi8>, none, tensor<1x640xf32>, tensor<1x2048xf32>, none, tensor<2048xf32>, tensor<2048xf32>, tensor<2048xf32>) -> tensor<*xf32>
allieculp commented 2 years ago

@not-jenni Can you help give this a priority as you are on frontend rotation this week?

not-jenni commented 2 years ago

Adding support for tfl.lstm would unblock ~9% of production models, so I'll mark this as a P1

allieculp commented 1 year ago

@rsuderman Still open? Still P1?