-
Notifications
You must be signed in to change notification settings - Fork 522
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
[QUERY] How to stop torch-mlir from decomposing certain ops when using torch dynamo #3953
Comments
|
I am trying to stop decomposition of operations like layer_norm or softmax. Even after passing the empty list, it decomposing. Although I found an alternate route to do that. like torch script, we can use backend_legal_ops argument before running the pass like this. torch-mlir/projects/pt1/python/torch_mlir/torchscript.py Lines 339 to 346 in 11efcda
This seems like a useful feature, and since torch-mlir is migrating more towards dynamo, I believe dynamo export must also have this feature. I can send a PR for this |
Added `backend-legal-ops` argument in `fx.import_and_export` to stop decomposition of certain torch ops. This PR is based on this [issue](#3953)
When I was
torchscript.compile
, there is a argumentbackend_legal_ops
which optionally stops torch-mlir from decomposing certain aten ops. But I couldn't find something similar when usingfx.import_and_export
. If there is someone please help how to do it.The text was updated successfully, but these errors were encountered: