trunk/59356ef48b46afa2f817c09bf6b0cbd224f74314: Fix export move_to_device_pass device rewrites (#185105)
- PyTorch: 1470 events in the last 90 days
- PyTorch: 1451th Release in the last 90 days
- Previous: earlier the same day · trunk/377ffb934bd31a1538eb67a5ee1bc5cba10a4660: AArch64: FP16 matmul (#198498)
What happened
move_to_device_pass rewrites device-bearing FX nodes and tensor metadata, but it did not recompile the affected GraphModules. Generated Python could therefore retain stale _assert_tensor_metadata device arguments and fail when the moved graph ran directly through ep.graph_module . Recompile every GraphModule touched by the pass so its callable code matches the rewritten graph. Export also supports interpreter-only g…
Summary assembled by rule from the sources below