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

Reduce MHLO #ifdefs #1227

Closed
silvasean opened this issue Aug 15, 2022 · 2 comments
Closed

Reduce MHLO #ifdefs #1227

silvasean opened this issue Aug 15, 2022 · 2 comments

Comments

@silvasean
Copy link
Contributor

We try to avoid using #ifdefs because they make it impossible to test all the configurations easily.

I noticed two in TorchToMhlo that can be removed.

TORCH_MLIR_ENABLE_MHLO_STATIC_SHAPE
TORCH_MLIR_ENABLE_MHLO_TRUNC_DIMSIZE_TO_I32

We should add those as pass options to the convert-torch-to-mhlo pass, and pass them down to the patterns that need them.
(see here for how to add pass options: https://mlir.llvm.org/docs/PassManagement/#declarative-pass-specification)

cc @ZihengJiang @fortianyou

@tanyokwok
Copy link
Collaborator

Sure! This is a good suggestion. I will try it out recently.

tanyokwok pushed a commit that referenced this issue Aug 30, 2022
Related to #1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
tanyokwok pushed a commit that referenced this issue Aug 30, 2022
Related to #1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
tanyokwok pushed a commit that referenced this issue Sep 1, 2022
Related to #1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
AmosLewis pushed a commit to AmosLewis/torch-mlir that referenced this issue Sep 1, 2022
Related to llvm#1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
AmosLewis pushed a commit to AmosLewis/torch-mlir that referenced this issue Sep 2, 2022
Related to llvm#1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
AmosLewis pushed a commit to AmosLewis/torch-mlir that referenced this issue Sep 2, 2022
Related to llvm#1227

1. Reduce MHLO #ifdefs
2. Dismiss compilation warnings
@silvasean
Copy link
Contributor Author

Fixed in #1315

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

No branches or pull requests

2 participants