[TorchToTosa] Avoid i1 gather by casting through i8#4491
Open
[TorchToTosa] Avoid i1 gather by casting through i8#4491
Conversation
TOSA gather does not accept i1 tensors. When gather element type is i1, cast inputs to i8, perform the gather (including gather-nd paths), then cast back to i1. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I8e3034612c2fabec7c9e75d8295a863860a674c2
Contributor
Author
- Add a TOSA utility to create gather ops with i1→i8 casting, reuse it in two lowering sites, and add a bool gather e2e test. Change-Id: Iff173dadfbf03ba982cac0409492b939255cdbd9 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: I153fa333170725c4ccd4c2941d93f36dfa5f712e Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: If77622dd5626139f3f740539488c2c8de4f07098 Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TOSA gather does not accept i1 tensors.
When gather element type is i1, cast inputs to i8, perform the gather (including gather-nd paths), then cast back to i1.
Change-Id: I8e3034612c2fabec7c9e75d8295a863860a674c2