tensorflow/mlir-hlo

pretty print chlo.comparison*

silvasean opened this issue · 3 comments

I saw this op flying by in a review and it could be quite a bit more succinct:

chlo.broadcast_compare %[[T0]], %[[T1]] {compare_type = #chlo<comparison_type FLOAT>, comparison_direction = #chlo<comparison_direction LT>} : (tensor<?x?xf32>, tensor<64xf32>) -> tensor<?x?xi1>

could be

chlo.broadcast_compare %[[T0]], %[[T1]] FLOAT, LT : tensor<?x?xf32>, tensor<64xf32> -> tensor<?x?xi1>

Or just drop FLOAT

chlo.broadcast_compare LT, %[[T0]], %[[T1]] : tensor<?x?xf32>, tensor<64xf32> -> tensor<?x?xi1>

@GleasonK

@burmako should we move this issue to the stablehlo repo? I believe we are moving CHLO there to avoid a duplicate copy of the dialect.

@GleasonK Yeah, let's move. The source of truth for CHLO is in the StableHLO repository, so I think it makes sense to track feature requests / bugs in CHLO there.

Created openxla/stablehlo#181. This issue will be addressed in StableHLO and can be closed here.