-
Notifications
You must be signed in to change notification settings - Fork 412
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
Perhaps a bug with op aten.split_with_sizes? #7430
Comments
The Core Aten IR doc(https://pytorch.org/docs/stable/torch.compiler_ir.html) says the schema of operator |
Yeah what you said sounds right. Probably default values are not baked in, which means you can potentially account for that here https://github.com/pytorch/executorch/blob/main/backends/qualcomm/builders/op_split_with_sizes.py#L67, where you can do
If you try that does it work? |
yeah mps has the same issue here
|
Thank you, this fix works for me. |
🐛 Describe the bug
I wrote a custom model like this:
Then I tried exporting it to QNN backend using following code:
But I got errors:
After some "print()", I found that nodes like this were generated:
And the 'NoneType' error is caused by node getitem_2, in file op_linear.py,
weight_tensor
isNone
(andbias_tensor
isNone
for node getitem_5).I tried setting the value of these 'None' tensors to
node.meta["val"]
(maybe it's not correct), and following errors appeared:The node is aten_split_with_sizes_default_1, and the args of it is (p_attn_in_proj_bias, [512, 512, 512]), so it does indeed trigger "index out of range".
I think maybe it is a bug related to this specific op. I also tried the same model code with mps backend, using command like
python3 -m examples.apple.mps.scripts.mps_example --model_name="test" --bundled
The Edge IR Graph printed is:
It gave me a similar "tuple index out of range" error like QNN backend with node name "aten_split_with_sizes_copy_default".
Versions
Python: 3.10.16
ExecuTorch: 0.4
QNN SDK: 2.29.0.241129
The text was updated successfully, but these errors were encountered: