You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[RFC][VM] Failing to legalize arith.extf from f32 to f64 #20022
I'm debugging some issues in the iree-test-suitesonnx_ops tests, which uses the flag --iree-input-demote-f64-to-f32=false. See #17345 (comment) for some context.
The issue is that, in some torch-mlir conversions, we are comparing a runtime-generated f32 scalar value to a torch.constant.float (which is stored as f64). E.g., generating IR like:
it's expected that should work - so I'd look for why it isn't. arith.extf should become vm.ext.f32.f64 and arith.cmpf ueq should become vm.cmp.eq.f64.u.
yay, that's the best situation :P
you're probably hitting these for the first time as nearly everyone runs in f32.
it'll be nice to have the full coverage - if you spot anymore missing patterns while you're digging in there feel free to add them too - if you're using f64 you're likely to hit them at some point!
Activity
benvanik commentedon Feb 18, 2025
it's expected that should work - so I'd look for why it isn't.
arith.extfshould becomevm.ext.f32.f64andarith.cmpf ueqshould becomevm.cmp.eq.f64.u.zjgarvey commentedon Feb 19, 2025
It looks like both of those are missing from
ArithToVm(although the op codes are already defined). I'll go ahead and add the conversions.I figured there might be a specific reason why they weren't supported.
benvanik commentedon Feb 19, 2025
yay, that's the best situation :P
you're probably hitting these for the first time as nearly everyone runs in f32.
it'll be nice to have the full coverage - if you spot anymore missing patterns while you're digging in there feel free to add them too - if you're using f64 you're likely to hit them at some point!
[VM] Add some missing `arith-to-vm` patterns (#20079)
[VM] Add some missing `arith-to-vm` patterns (#20079)