BladeDISC
BladeDISC copied to clipboard
Please add mhlo::PadOp lowering in disc
Currently, DISC lowers all pad-like op into mhlo::DynamicPadOp
. However, the DPadToPad
pattern in mhlo::DynamicPadOp
's CanonicalizationPatterns may convert mhlo::DynamicPadOp
into mhlo::PadOp
since the rebase https://github.com/alibaba/BladeDISC/pull/525. It will cause lowering exception of DISC.
To address the issue, we masked the usage of DPadToPad
pattern. I think more foundermental solution is to add mhlo::PadOp
lowering and codegen in DISC.
Seems because we only handle DynamicPadOp
through out the lowering pipeline. (for simplicity??)
How about add a pass somewhere in early stage to convert PadOp
to DynamicPadOp
?
Yes, DISC did do that. But DPadToPad
will convert PadOp
back to DynamicPadOp
.
We now convert mhlo::PadOp
into mhlo::DynamicPadOp
in DISC, since the dynamic one is more general https://github.com/alibaba/BladeDISC/pull/978