Hi Rafael, virtual device handling is unfortunately in a halfway-implemented state, and it’s been on my backlog for a while to wrap that up. Sorry about that! I’m hoping I can work on it in a few weeks as a break between other tasks.
There’s a few things to be done:
- Populate the virtual_device field on every expression node, and remove the use of ‘on_device’ annotations to record device information.
- As you are noticing, propagate virtual_device info through the passes by migrating to WithFields (which should have the happy side effect of also propagating spans and other generic information.)
- Update the existing passes that need to understand virtual devices.
However I think consensus is this is better done in Relax, so another possibility is to backtrack.