mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
Summary: Adds handling of constant branches to the TensorExpr IR Simplifier. This covers both IfThenElse and Cond when the condition expression is a known constant (e.g. `IfThenElse(1, X, Y) => X`), or when both arms of the branch are the same (e.g. `IfThenElse(Y, X, X) => X`). Pull Request resolved: https://github.com/pytorch/pytorch/pull/36257 Differential Revision: D20947777 Pulled By: nickgg fbshipit-source-id: 974379e42a6d65ce3e7178622afb62d36ad4e380