openxla / stablehlo

Backward compatible ML compute opset inspired by HLO/MHLO
Apache License 2.0
357 stars 100 forks source link

Fix operand order for a few quantized tests #2414

Closed sdasgup3 closed 1 week ago

sdasgup3 commented 1 week ago

This is to fix the order of operands in a few generated output testdata files.

For example, for the generated quantized testdata file stablehlo/testdata/quantized/div_dtypes_lhs_float32_2__rhs_float32_2_qi8.mlir, the corresponding https://github.com/openxla/stablehlo/blob/a710fd72e3fa7e74b25d34d7f7d0bbe18cd408ef/stablehlo/testdata/div_dtypes_lhs_float32_2__rhs_float32_2.mlir#L4 the intents to divide %0 = stablehlo.constant dense<[-1.51913178, -1.08529949]> : tensor<2xf32> by %1 = stablehlo.constant dense<[2.67503524, -1.21969211]> : tensor<2xf32>. But in the quantized testdtat file div_dtypes_lhs_float32_2__rhs_float32_2_qi8.mlir the order is wrong.

Same with other files. (You can find the input file by dropping the suffix _qi8 from the quantized testsdata file name.