Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a hybrid tf-tfl lowering pipline for TOSA #52686

Merged
merged 1 commit into from Oct 27, 2021

Conversation

rsuderman
Copy link
Contributor

By adding the pass to lift Flex ops to TensorFlow Dialect operations it is
possible to have a mixture of both TensorFlow and TensorFlow Lite dialects.
Having a combined set of patterns using TOSA's shape inference frameowrk it is
possible to fully lower / shape infer TFLite models with flex operations.

These patterns must be included in a single pass so that shape inference can
execute on both dialects. If performed separately, lack of cooperating
lowerings may not result in a fully available lowering.

By adding the pass to lift Flex ops to TensorFlow Dialect operations it is
possible to have a mixture of both TensorFlow and TensorFlow Lite dialects.
Having a combined set of patterns using TOSA's shape inference frameowrk it is
possible to fully lower / shape infer TFLite models with flex operations.

These patterns must be included in a single pass so that shape inference can
execute on both dialects. If performed separately, lack of cooperating
lowerings may not result in a fully available lowering.
@google-ml-butler google-ml-butler bot added awaiting review Pull request awaiting review size:L CL Change Size: Large labels Oct 26, 2021
@google-cla google-cla bot added the cla: yes label Oct 26, 2021
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Oct 27, 2021
@sanjoy sanjoy removed their request for review October 27, 2021 21:22
copybara-service bot pushed a commit to iree-org/iree that referenced this pull request Oct 27, 2021
Imported from GitHub PR tensorflow/tensorflow#52686

By adding the pass to lift Flex ops to TensorFlow Dialect operations it is
possible to have a mixture of both TensorFlow and TensorFlow Lite dialects.
Having a combined set of patterns using TOSA's shape inference frameowrk it is
possible to fully lower / shape infer TFLite models with flex operations.

These patterns must be included in a single pass so that shape inference can
execute on both dialects. If performed separately, lack of cooperating
lowerings may not result in a fully available lowering.
Copybara import of the project:

--
14789179cc251ab5787daa5a07e41b563c900fbb by Rob Suderman <rob.suderman@gmail.com>:

Create a hybrid tf-tfl lowering pipline for TOSA

By adding the pass to lift Flex ops to TensorFlow Dialect operations it is
possible to have a mixture of both TensorFlow and TensorFlow Lite dialects.
Having a combined set of patterns using TOSA's shape inference frameowrk it is
possible to fully lower / shape infer TFLite models with flex operations.

These patterns must be included in a single pass so that shape inference can
execute on both dialects. If performed separately, lack of cooperating
lowerings may not result in a fully available lowering.

PiperOrigin-RevId: 405994127
@copybara-service copybara-service bot merged commit 6b0d1c0 into tensorflow:master Oct 27, 2021
@google-ml-butler google-ml-butler bot removed the awaiting review Pull request awaiting review label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes size:L CL Change Size: Large
Projects
PR Queue
  
Assigned Reviewer
Development

Successfully merging this pull request may close these issues.

None yet

2 participants