-
Notifications
You must be signed in to change notification settings - Fork 48
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
Strange behavior while lowering nn.BatchNorm2d #110
Comments
Thanks for filing this! You aren't doing anything wrong. We need to update the pypi version of turbine. If you do |
Export works with latest turbine (I guess), but
|
Here is a minimal reproduction:
|
Bumping this issue since not having working |
We may be missing patterns to elide zero element tensors. |
The key debug info is 'tensor.cast' op operand type 'tensor<?xui8>' and result type 'tensor<0xi8>' are cast incompatible With manually build iree-compile from iree source code, I finally locate the fail ops
Then The torch-mlir-opt debug info is here: |
One more bug: the
|
Is there any progress/workaround yet? |
Yes. Should be fixed this week. |
For the upstream fix, we will need to push a fix patch in torch-mlir upstream and then uplift the torch-mlir version IREE, then uplift IREE version Shark-Turbine, it will take some time. So here I provide a local quick fix for your usage. For the runtime error.
with
Then build iree locally
Then in order to use the new build python bindings, in your shark-turbine python env you have to
And set PYTHONPATH with the iree new build python bindings, here is an example in my path: For the save_mlir incompatible error: you can use |
When converting vtenor to buildin tensor, the converter wrong convert the ui8 to i8. This will lead to other type cast issue in later usage of i8. Here is example: nod-ai/SHARK-ModelDev#110
When converting vtenor to buildin tensor, the converter wrong convert the ui8 to i8. This will lead to other type cast issue in later usage of i8. Here is example: nod-ai/SHARK-ModelDev#110
@JBloodless With the TOM torch-mlir the issue is fixed now. We will next uplift the change into IREE and then shark-turbine.
|
Bumping torch-mlir on 11/29/2023 up to commit e568f7e This can fix the BatchNorm2d runtime error: nod-ai/SHARK-ModelDev#110
Bumping torch-mlir on 11/29/2023 up to commit e568f7e. This can fix the BatchNorm2d runtime error: nod-ai/SHARK-ModelDev#110
Bumping torch-mlir on 11/29/2023 up to commit e568f7e. This can fix the BatchNorm2d runtime error: nod-ai/SHARK-ModelDev#110
To solve the issue nod-ai#110
To solve the issue nod-ai#110
@JBloodless Now you can fix your issue in Shark-Turbine Python env by changing requirements to
|
Seems like these versions are not in pypi yet, but I'll keep monitoring after the weekend, thanks |
You need the |
Closing this since BatchNorm2d seems to be fixed with |
To solve the batchnorm2d issue nod-ai#110 Xfail llama_test becasue missing ops from torch to linalg Xfail uninitialized parameters test
To solve the batchnorm2d issue nod-ai#110 Xfail llama_test becasue missing ops from torch to linalg Xfail uninitialized parameters test
To solve the batchnorm2d issue nod-ai#110 Xfail llama_test becasue missing ops from torch to linalg
To solve the batchnorm2d issue nod-ai#110 Xfail llama_test becasue missing ops from torch to linalg
Bumping torch-mlir on 11/29/2023 up to commit e568f7e. This can fix the BatchNorm2d runtime error: nod-ai/SHARK-ModelDev#110
Hello. I'm using the most basic BatchNorm in my model and for some reason it is being lowered to some strange variation, which is not supported.
Here's minimal repro:
And here's what I get:
Why BatchNorm fallbacks to this
_native_batch_norm_legit_no_training
and what am I doing wrong here?The text was updated successfully, but these errors were encountered: