Repository navigation
[MLIR] Fix hlo to lhlo conversion amid std.constant ops - #40120
bondhugula wants to merge 1 commit into
Conversation
|
@MaheshRavishankar @sherhut @pifon2a for visibility. |
|
|
||
| // Test whether std.constant's generating tensors are converted to lhlo.const. | ||
| func @std.const.tensor() { | ||
| %cst = constant dense<0.000000e+00> : tensor<f32> |
There was a problem hiding this comment.
why is it not an xla_hlo.constant?
There was a problem hiding this comment.
why is it not an
xla_hlo.constant?
Please see here: #39895
Add a conversion pattern to convert std.constant to xla_lhlo.const - to run during HLO to LHLO conversion. Without such a pattern, xla_hlo to xla_lhlo conversion would fail when std.constant ops provide constant tensor operands to other xla_hlo ops. The tf-mlir-translate -hlo-to-mlir-hlo for example generates such std.constant ops from HLO constant nodes. std.constant tensor generating ops are to be replaced by constant memref generating ops. Fixes tensorflow#39895. Signed-off-by: Uday Bondhugula <[email protected]>
|
(discussion is going on in the tracking bug #39895) |
|
@bondhugula, @joker-eph This PR is in draft, any update on this? Please. Thanks! |
1 similar comment
|
@bondhugula, @joker-eph This PR is in draft, any update on this? Please. Thanks! |
I just posted on the other issue thread #39895 to resurrect discussion. |
@bondhugula Any update on this PR? Please. Thanks! |
|
There isn't a clear solution to this issue and this has become moot / low priority - given that there are ways to avoid it trivially. I'm closing this. The bug it was trying to fix should remain open however - the behavior / error isn't proper. |
Add a conversion pattern to convert std.constant to xla_lhlo.const - to
run during HLO to LHLO conversion. Without such a pattern, xla_hlo to
xla_lhlo conversion would fail when std.constant ops provide constant tensor
operands to other xla_hlo ops. The tf-mlir-translate -hlo-to-mlir-hlo
for example generates such std.constant ops from HLO constant nodes.
std.constant tensor generating ops are to be replaced by constant memref
generating ops.
Fixes #39895.
Signed-off-by: Uday Bondhugula [email protected]