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

[TOSA] TOSA updates for LLVM hash 5d6d982 #3992

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

justin-ngo-arm
Copy link
Contributor

PR summary:

  • [TOSA] Add operands and result ranks equalization
  • [TOSA] Update tosa.pad with !tosa.shape padding
  • [TOSA] Add NaN Propagation mode support for some TOSA ops
  • [Torch][TOSA] Remove usages of isF...() APIs for low-precision FP
  • [TOSA] Remove temporary getTosaConstShape() func

* TOSA requires operands' and result's ranks to be same according to
  the SameOperandsAndResultRank trait (link to LLVM PR:
  https://github.com/llvm/llvm-project/pull/104501/files).
* Use EqualizeRanks() function to equalize ranks among operands and
  results before creating TOSA ops.
* Update LIT tests.

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I48a8ebe82ec462026181abfde3ce1e129226e0bd
* Update tosa.pad with padding input as type !tosa.shape<rank * 2>
* Update LIT test

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I12e12060f710e144fcb0da67910b388199fdc527
* TOSA ops' maximum, minimum, reduce_max, reduce_min, max_pool, clamp,
  and argmax has a new NaN propagation mode added as an attribute.
  LLVM PR: llvm/llvm-project#121951
* Add NaN Propagation mode attributes to the ops mentioned above in
  Torch to TOSA legalization.

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I27dfda9d0146da8742f14718c713998c436899ce
* `isF...()` APIs are deprecated for low-precision FP types like
  Float4E2M1FN according to this LLVM PR:
  llvm/llvm-project#123326
* These API usages are replaced with `isa<Float...Type>(type)` instead.
  For example: `isa<Float4E2M1FNType>(type)`

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: Ia6073987cb4348fa4a701bc182f961786e85e20c
Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I4e1c19869b90903058f2f3f8b934191b85efe5ef
@justin-ngo-arm justin-ngo-arm changed the title TOSA updates for LLVM hash 5d6d982 [TOSA] TOSA updates for LLVM hash 5d6d982 Jan 29, 2025
Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I1ad7276cf2985ebb2e2a52fdfe596d6a4f28125c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants