-
Notifications
You must be signed in to change notification settings - Fork 525
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
[torch-dialect] emit aten.as_strided op #2280
base: main
Are you sure you want to change the base?
Conversation
8a0b2f2
to
1e04260
Compare
My CI failed several times. Could you please help me find out why? @ramiro050 . Thanks! |
fb8e9de
to
c8ea0a0
Compare
The tests hang when a test cases crashes. I see |
Thanks for your reminder. I found the code mistakes and fix them in the lated commit. |
This is a tricky op to support in torch-mlir because it interacts with the storage of the tensor directly, and at the torch-mlir level there is no concept of storage. See discussion here: #1742 (comment) How are you encountering this op? |
I understand your concern about |
So is there any possibility to support this op in Torch-MLIR, if it does come from a PyTorch model? |
I also remember seeing this op coming from dynamo/make_fx decompositions. |
Yeah, that would be the approach to take. My guess is that this op is being generating by PyTorch from decomposing a higher level op, so we need to identify the pattern and fold it back into the high level op. |
This patch is an extension for PR #1742 . The difference is that, this patch tries to decompose
aten.as_strided
in torch dialect directly, rather than rely on dialect conversion pass to handle it. Also, this patch adds a folder foraten.as_strided
when it does nothing.