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 1.0 updates for LLVM hash 64edde66 #3978

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

Conversation

justin-ngo-arm
Copy link
Contributor

Update Torch to TOSA legalizations with TOSA 1.0 ops' forms from LLVM hash 64edde66. Changes include:

  • TOSA Pad op's new shape requirement
  • TOSA Convolution ops' new acc_type
  • TOSA Tile with multiples as a !tosa.shape input

* TOSA 1.0 spec has a new pad shape for tosa.pad:
  https://www.mlplatform.org/tosa/tosa_spec.html#_pad
* Update Torch to TOSA legalization for aten.constant_pad_nd according
  to the new shape in TOSA spec
* Add new LIT test

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: Id92eb342b7fbdb67c564acddb92c01eaf2e7b95a
* TOSA conv ops have a new acc_type attribute in TOSA 1.0 spec:
  https://www.mlplatform.org/tosa/tosa_spec.html#_conv2d
* Add this new acc_type attribute to TOSA conv ops for aten.convolution
  legalization from Torch to TOSA
* Add new LIT tests

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: Ie32b4879d1e6070a9fd20b0aa04a54d79c025018
* Update tosa.tile with 'multiples' as an input of !tosa.shape instead
  of as an attribute. This is in alignment with TOSA 1.0 spec:
  https://www.mlplatform.org/tosa/tosa_spec.html#_tile
* Add a temporary getTosaConstShape() function in TosaLegalizeUtils.h.
  This function will be removed when the permanent getTosaConstShape()
function is available in mlir/include/mlir/Dialect/Tosa/Utils/ConversionUtils.h
in a future LLVM bump in Torch-MLIR.
* Update LIT tests

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: I8c45160331d79e29b3df68cd74ad3bbd1b5a8042
@justin-ngo-arm
Copy link
Contributor Author

@vivekkhandelwal1 This is the PR with all TOSA updates for the LLVM hash you are targeting. Please let me know if you want me to add/change anything. Thanks!

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.

1 participant