[MLIR] op attribute 'dot_dimension_numbers' failed to satisfy constraint

After i upgraded the mhlo version from 3153643 May 31 2021 to d65972fa Feb 15 2022, i faced a error when i convert HLO_DotGeneralOp.
the file dot_general_test.mlir worked ok for old version, and error for the new version.
the messeage is as follow:

3:10: error: 'mhlo.dot_general' op attribute 'dot_dimension_numbers' failed to satisfy constraint: Attribute that models the dimension information for dot.
    %0 = "mhlo.dot_general"(%arg0, %arg1) {dot_dimension_numbers = {lhs_batching_dimensions = dense<0> : tensor<1xi64>, rhs_batching_dimensions = dense<0> : tensor<1xi64>, lhs_contracting_dimensions = dense<2> : tensor<1xi64>, rhs_contracting_dimensions = dense<1> : tensor<1xi64>}, precision_config = ["DEFAULT", "DEFAULT"]} : (tensor<48x64x64xf32>, tensor<48x64x64xf32>) -> tensor<48x64x64xf32>
         ^
dot_general_test.mlir:3:10: note: see current operation: %0 = "mhlo.dot_general"(%arg0, %arg1) {dot_dimension_numbers = {lhs_batching_dimensions = dense<0> : tensor<1xi64>, lhs_contracting_dimensions = dense<2> : tensor<1xi64>, rhs_batching_dimensions = dense<0> : tensor<1xi64>, rhs_contracting_dimensions = dense<1> : tensor<1xi64>}, precision_config = ["DEFAULT", "DEFAULT"]} : (tensor<48x64x64xf32>, tensor<48x64x64xf32>) -> tensor<48x64x64xf32>

There was a change to use a specific first class attribute instead of a struct attribute. You need to adjust the test. Something like this should work:

%0 = “mhlo.dot_general”(%arg0, %arg1) {dot_dimension_numbers = #mhlo.dot<lhs_batching_dimensions = [0], rhs_batching_dimensions = [0], lhs_contracting_dimensions = [2], rhs_contracting_dimensions = [1]>, precision_config = [“DEFAULT”, “DEFAULT”]} : (tensor<48x64x64xf32>, tensor<48x64x64xf32>) → tensor<48x64x64xf32>

Thanks a lot, i adjusted the test as follow, it works:

module {
  func @main(%arg0: tensor<48x64x64xf32>, %arg1: tensor<48x64x64xf32>) -> tensor<48x64x64xf32> {
    %0 = "mhlo.dot_general"(%arg0, %arg1) {
	dot_dimension_numbers = #mhlo.dot<
	lhs_batching_dimensions = [0], 
	rhs_batching_dimensions = [0], 
	lhs_contracting_dimensions = [2], 
	rhs_contracting_dimensions = [1]
	>, precision_config = ["DEFAULT", "DEFAULT"]} : (tensor<48x64x64xf32>, tensor<48x64x64xf32>) -> tensor<48x64x64xf32>
    return %0 : tensor<48x64x64xf32>
  }
}