Buck fwd-fix: wire up legalize_portable_dim_order_pass (#20971)#20971
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20971
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d7b236f with merge base af62dce ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@psiddh has exported this pull request. If you are a Meta employee, you can view the originating Diff in D112243998. |
There was a problem hiding this comment.
Pull request overview
This PR fixes Buck build wiring for LegalizePortableDimOrderPass by adding a dedicated runtime.python_library target for legalize_portable_dim_order_pass.py and ensuring it is pulled into executorch.exir.passes via the existing :lib target dependencies. This prevents ModuleNotFoundError when consumers import executorch.exir.passes under Buck.
Changes:
- Add a new
legalize_portable_dim_order_passruntime.python_librarytarget with the required deps. - Add
:legalize_portable_dim_order_passto the:libtargetdepsso the module is available when__init__.pyimports it.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR needs a
|
Summary: Forward fix for D111976876 (DiffTrain import of pytorch/executorch pytorch#20878). That diff added `executorch/exir/passes/legalize_portable_dim_order_pass.py` and imports `LegalizePortableDimOrderPass` at the top of `exir/passes/__init__.py`, but like every DiffTrain import it carried no Buck changes. Since `exir/passes/BUCK` uses explicit per-file `srcs` lists (no globs), the new module was never wired into any target, so importing `executorch.exir.passes` fails with `ModuleNotFoundError: No module named 'executorch.exir.passes.legalize_portable_dim_order_pass'`. This breaks every fbcode consumer of `//executorch/exir/passes:lib`, including the arm test listing for `fold_scalar_mul_into_conv_pass` (D112075757) and the residual `backends/arm/test:*` listing failures on D112027047. This adds a `legalize_portable_dim_order_pass` `runtime.python_library` (deps mirror the sibling `memory_format_ops_pass`) and adds it to the `:lib` target `deps`, in both `fbcode` and `xplat` `exir/passes/BUCK`. Authored with Claude Code. Differential Revision: D112243998
9ce6799 to
d7b236f
Compare
Summary:
Forward fix for D111976876 (DiffTrain import of pytorch/executorch #20878). That diff added
executorch/exir/passes/legalize_portable_dim_order_pass.pyand importsLegalizePortableDimOrderPassat the top ofexir/passes/__init__.py, but like every DiffTrain import it carried no Buck changes. Sinceexir/passes/BUCKuses explicit per-filesrcslists (no globs), the new module was never wired into any target, so importingexecutorch.exir.passesfails withModuleNotFoundError: No module named 'executorch.exir.passes.legalize_portable_dim_order_pass'. This breaks every fbcode consumer of//executorch/exir/passes:lib, including the arm test listing forfold_scalar_mul_into_conv_pass(D112075757) and the residualbackends/arm/test:*listing failures on D112027047.This adds a
legalize_portable_dim_order_passruntime.python_library(deps mirror the siblingmemory_format_ops_pass) and adds it to the:libtargetdeps, in bothfbcodeandxplatexir/passes/BUCK.Authored with Claude Code.
Differential Revision: D112243998