Skip to content

[Task] : Fix LIT test + disable pass failure for unlowered torch ops. #1

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

Merged
merged 2 commits into from
May 14, 2025

Conversation

sahas3
Copy link
Member

@sahas3 sahas3 commented May 9, 2025

  1. Disabled createVerifyTosaLinalgBackendContractPass pass to avoid erroring out early. This will leave unsupported ops in the IR which we can then catch by "unregistered dialect" in our cgir-mlir-opt pass.
  2. Added custom type conversion passes that keeps uint8 as uint8 similar to the StableHloBackend.
  3. Added custom FinalizingBackendTypeConversionForTosaLinalg pass to do greedy pattern rewriting instead of full to avoid failures when some patterns cannot be replaced. torch.constant.int is one such op that will cause the pass to fail in full rewrite pass. Instead we only replace as much as we can and then report the unlowered ops from cgir-mlir-opt.
  4. Refactored the import_exported_program call to be able to dump raw torch IR similar to how we dump tfl IR.

@sahas3 sahas3 requested a review from Hanumanth04 May 13, 2025 19:43
@Hanumanth04
Copy link

Hanumanth04 commented May 14, 2025

Could you please republish the PR with the updated changes whenever the changes are ready? I will take another quick look and approve the PR.

@sahas3 sahas3 merged commit fe21276 into mw_main May 14, 2025
1 check passed
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