Arm backend: Add passes to handle int64 const and int64 output ops#13803
Conversation
- Add ConvertInt64ConstOpsToInt32Pass to convert constant-producing ops
that output int64 to instead output int32, when values are within
int32 bounds.
Supported Ops:
`torch.full`, `torch.arange`, `torch.eye`, `torch.linspace`,
`torch.tensor`
- Add ConvertInt64OutputOpsToInt32Pass to
1. convert or remove unnecessary casts to int64
2. insert an int64->int32 cast after the argmax ndoes
that produce int64 outputs
Signed-off-by: Yufeng Shi <yufeng.shi@arm.com>
Change-Id: I04e5fa9a7170c5b5dc785ae8619189545de0ec2c
Co-authored-by: Erik Lundell <erik.lundell@arm.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/13803
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 4 New Failures, 4 Unrelated FailuresAs of commit ee352a4 with merge base 389918b ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Test fails are unrelated |
|
@YufengShi-dudu we've got a few test failures for this PR when it's tested internally with Buck.
Example log: |
|
Thanks for the issue and example log. We find that your internal Have you merged the int16 patches internally? We are also working on the int16. I think we will add some xfails to these tests as a turnaround before we improve data type checks during partitioning. cc: @Ninja91 @per |
|
@YufengShi-dudu I can check, which PR contains the int16 patches? |
|
@YufengShi-dudu This is the PR: #13658. It's merged and looks like waiting to be merged to main. I have added xfails on those tests as well. cc: @digantdesai |
Add ConvertInt64ConstOpsToInt32Pass to convert constant-producing ops that output int64 to instead output int32, when values are within int32 bounds. Supported Ops:
torch.full,torch.arange,torch.eye,torch.linspace,torch.tensorAdd ConvertInt64OutputOpsToInt32Pass to
Change-Id: I04e5fa9a7170c5b5dc785ae8619189545de0ec2c
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218