Skip to content

Conversation

@eszpotanski
Copy link

The ReorderElementwiseAndShapeOP pattern is not compatible with the rewriter used by iree-stablehlo-to-iree-input pass - as some modifications are applied immediately and others (e.g. replaceAllUsesWith) are delayed, it produces invalid state resulting with errors like:

compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_iree_input_dialects.mlir:157:8: error: failed to legalize operation 'stablehlo.subtract' that was explicitly marked illegal
  %2 = stablehlo.subtract %arg1, %1 : tensor<1x2048xi32>
       ^
compiler/plugins/input/StableHLO/Conversion/test/stablehlo_to_iree_input_dialects.mlir:157:8: note: see current operation: %3 = "stablehlo.subtract"(%arg1, %1) : (tensor<1x2048xi32>, tensor<2048xi32>) -> tensor<1x2048xi32>

This PR adds a test showcasing this error and disables the ReorderElementwiseAndShapeOP pattern for the iree-stablehlo-to-iree-input pass.

…stablehlo-to-iree-input

The ReorderElementwiseAndShapeOP pattern is not compatible with the
rewriter used in iree-stablehlo-to-iree-input.
Added test showcasing that and disabled the pattern in
iree-stablehlo-to-iree-input.

Signed-off-by: Eryk Szpotanski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant