/external/tensorflow/tensorflow/compiler/mlir/hlo/tests/ |
D | chlo_legalize_to_hlo_broadcasts.mlir | 1 // RUN: mlir-hlo-opt -chlo-legalize-to-hlo="broadcast-only=true" -cse -split-input-file -verify-dia… 8 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32> 29 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<?xf32>, tensor<?x?xf32>) -> tensor<?x?xf32> 50 …%0 = chlo.broadcast_complex %arg0, %arg1 : (tensor<?xf32>, tensor<?x?xf32>) -> tensor<?x?xcomplex<… 71 …%0 = chlo.broadcast_compare %arg0, %arg1 {comparison_direction = "EQ"} : (tensor<?xf32>, tensor<?x… 80 …%0 = chlo.broadcast_add %arg0, %arg1 {broadcast_dimensions = dense<1> : tensor<1xi64>} : (tensor<1… 89 …%0 = chlo.broadcast_add %arg0, %arg1 {broadcast_dimensions = dense<[]> : tensor<0xi64>} : (tensor<… 98 …%0 = chlo.broadcast_add %arg0, %arg1 {broadcast_dimensions = dense<[1, 2]> : tensor<2xi64>} : (ten… 107 …%0 = chlo.broadcast_add %arg0, %arg1 {broadcast_dimensions = dense<2> : tensor<1xi64>} : (tensor<1… 117 %0 = chlo.broadcast_and %arg0, %arg1 : (tensor<4xi1>, tensor<4xi1>) -> tensor<4xi1> [all …]
|
D | chlo_infer_shape_type_methods.mlir | 13 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32> 21 …%0 = chlo.broadcast_complex %arg0, %arg1 : (tensor<?xf32>, tensor<?x?xf32>) -> tensor<?x?xcomplex<… 30 …%0 = chlo.broadcast_compare %arg0, %arg1 {comparison_direction = "EQ"} : (tensor<?xf32>, tensor<?x… 39 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<?xf32>, tensor<?xf32>) -> tensor<?xf32> 48 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<?xf32>, tensor<?x3xf32>) -> tensor<?x3xf32>
|
D | hlo-transform-unranked.mlir | 93 // CHECK: %[[FLAT_B:.*]] = chlo.tan %[[FLAT_A]] : tensor<?xf32> -> tensor<?xf32> 96 %result = chlo.tan %a : tensor<*xf32> -> tensor<*xf32> 103 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<f32>, tensor<*xf32>) 118 // CHECK-NEXT: %[[BROADCASTED_RESULT:.*]] = chlo.broadcast_add %[[ARG_0]], %[[RESHAPED]] … 127 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<*xf32>, tensor<f32>) 142 // CHECK-NEXT: %[[BROADCASTED_RESULT:.*]] = chlo.broadcast_add %[[RESHAPED]], %[[ARG_1]] … 152 %0 = chlo.broadcast_add %arg0, %arg1 : (tensor<*xf32>, tensor<*xf32>) 171 // CHECK-NEXT: %[[LHS_SCALAR_RESULT:.*]] = chlo.broadcast_add %[[SCALAR_LHS]], %[[RESHA… 184 // CHECK-NEXT: %[[RHS_SCALAR_RESULT:.*]] = chlo.broadcast_add %[[RESHAPED_LHS]], %[[S… 216 // CHECK-NEXT: %[[RESULT_RANK_1:.*]] = chlo.broadcast_add %[[RESHAPED_LHS_1]], %[… [all …]
|
D | chlo_legalize_to_mhlo.mlir | 1 // RUN: mlir-hlo-opt --chlo-legalize-to-hlo --split-input-file %s | FileCheck %s 8 %result = "chlo.asinh"(%arg) : (tensor<bf16>) -> tensor<bf16> 17 %result = "chlo.asinh"(%arg) : (tensor<f16>) -> tensor<f16> 26 %result = "chlo.asinh"(%arg) : (tensor<f32>) -> tensor<f32> 74 %result = "chlo.asinh"(%arg) : (tensor<f64>) -> tensor<f64> 83 %result = "chlo.constant_like"(%arg) { value = 3.2 : f32 } 97 %result = "chlo.constant_like"(%arg) { value = 3.2 : f32 } 109 %1 = "chlo.conj"(%arg0) : (tensor<3xcomplex<f32>>) -> tensor<3xcomplex<f32>> 276 %1 = "chlo.erf"(%arg) : (tensor<f64>) -> tensor<f64> 328 %1 = "chlo.erf"(%arg) : (tensor<f32>) -> tensor<f32> [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/ |
D | chlo_legalize_to_hlo_pass.cc | 47 conversionTarget.addIllegalDialect<chlo::HloClientDialect>(); in runOnFunction() 56 chlo::PopulateChloBroadcastingPatterns(&getContext(), in runOnFunction() 58 conversionTarget.addLegalOp<chlo::ZetaOp, chlo::PolygammaOp>(); in runOnFunction() 60 chlo::PopulateLegalizeChloToHloPatterns(&getContext(), in runOnFunction()
|
D | chlo_legalize_to_hlo.cc | 44 namespace chlo { namespace 85 Value poly = chlo::getConstantLike(rewriter, loc, 0.0, x); in MaterializePolynomialApproximation() 89 loc, x.getType(), poly, chlo::getConstantLike(rewriter, loc, c, x)); in MaterializePolynomialApproximation() 156 Value eight = chlo::getConstantLike(rewriter, loc, 8.0, x); in MaterializeErfcApproximationF64ForMagnituteGEOne() 164 loc, z, chlo::getConstantLike(rewriter, loc, -kMaxlog, x), kLT); in MaterializeErfcApproximationF64ForMagnituteGEOne() 165 Value zero = chlo::getConstantLike(rewriter, loc, 0.0, x); in MaterializeErfcApproximationF64ForMagnituteGEOne() 174 Value two = chlo::getConstantLike(rewriter, loc, 2.0, x); in MaterializeErfcApproximationF64ForMagnituteGEOne() 222 Value one = chlo::getConstantLike(rewriter, loc, 1.0, x); in MaterializeErfApproximationF64() 249 Value one = chlo::getConstantLike(rewriter, loc, 1.0, x); in MaterializeErfcApproximationF64() 295 Value one = chlo::getConstantLike(rewriter, loc, 1.0, x); in MaterializeErfcApproximationF32ForMagnitudeGEOne() [all …]
|
D | transform_unranked_hlo.cc | 481 #define ADD_LEGAL_CHLO(op) AddLegalOpOnRankedTensor<chlo::op>(&target) in runOnFunction() 489 target.addDynamicallyLegalDialect<chlo::HloClientDialect>( in runOnFunction() 512 #define MAP_CHLO(op) ElementwiseOpConversion<chlo::op> in PopulateTransformUnrankedHloPatterns() 526 chlo::PopulateForBroadcastingBinaryOp< in PopulateTransformUnrankedHloPatterns() 528 chlo::PopulateForBroadcastingBinaryOp< in PopulateTransformUnrankedHloPatterns()
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/IR/ |
D | hlo_utils.td | 31 "chlo::getConstantLike($_builder, $_loc, " # value # ", $0)">; 34 "chlo::getConstantLikeMaxFiniteValue($_builder, $_loc, $0)">; 37 "chlo::getConstantLikeInfValue($_builder, $_loc, $0, /*negative=*/false)">; 40 "chlo::getConstantLikeInfValue($_builder, $_loc, $0, /*negative=*/true)">;
|
D | chlo_ops.h | 33 namespace chlo { 54 namespace chlo {
|
D | CMakeLists.txt | 27 add_mlir_hlo_dialect(chlo_ops chlo)
|
D | chlo_ops.td | 25 // chlo ops to canonical mhlo ops. 39 let name = "chlo"; 40 let cppNamespace = "::mlir::chlo"; 69 // These correspond to operations in the chlo and mhlo dialects without the
|
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/tests/ |
D | tf-legalize-to-lmhlo.mlir | 1 // RUN: tf-opt %s --xla-legalize-tf='legalize-chlo=false' | \ 2 // RUN: mlir-hlo-opt --transform-unranked-hlo --chlo-legalize-to-hlo --hlo-legalize-to-linalg | \
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/tests/ |
D | legalize_hlo.mlir | 12 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<3> : tensor<1xi64>} : (tenso… 23 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<3> : tensor<1xi64>} : (tenso… 34 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<3> : tensor<1xi64>} : (tenso… 57 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<1> : tensor<1xi64>} : (tenso… 68 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<[1, 2, 3]> : tensor<3xi64>} … 73 // CHECK: chlo.broadcast_add 75 …%0 = "chlo.broadcast_add"(%arg0, %arg1) {broadcast_dimensions = dense<[0, 1, 2]> : tensor<3xi64>} … 96 …%0 = "chlo.broadcast_divide"(%arg0, %arg1) {broadcast_dimensions = dense<1> : tensor<1xi64>} : (te… 118 …%0 = "chlo.broadcast_divide"(%arg0, %arg1) {broadcast_dimensions = dense<1> : tensor<1xi64>} : (te… 161 …%0 = "chlo.broadcast_multiply"(%arg0, %arg1) {broadcast_dimensions = dense<1> : tensor<1xi64>} : (… [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/xla/tests/ |
D | legalize-tf.mlir | 1 // RUN: tf-opt "-xla-legalize-tf=allow-partial-conversion legalize-chlo=false" %s | FILECHECK_OPTS=… 2 // RUN: tf-opt "-xla-legalize-tf=allow-partial-conversion legalize-chlo=true" -verify-diagnostics %… 4 // 1. Through FILECHECK_OPTS="" FileCheck with chlo legalization disabled since verifying 5 // that the chlo ops emit produces more useful tests. 6 // 2. With chlo legalization enabled, verifying diagnostics to pick up any 47 // CHECK: chlo.broadcast_multiply %[[VAR]], {{.*}} : (tensor<8xf32>, tensor<f32>) -> tensor<8xf32> 79 // CHECK: chlo.broadcast_multiply %[[VAR]], {{.*}} : (tensor<8xf32>, tensor<f32>) -> tensor<8xf32> 100 // CHECK: %[[CORRECTED_VAR:.*]] = chlo.broadcast_multiply %[[BATCH_VAR]], %[[FACTOR]] 105 // CHECK: %[[ALPHA_MUL_OLD_MEAN:.*]] = chlo.broadcast_multiply %[[ALPHA]], %arg3 106 // CHECK: %[[BETA_MUL_BATCH_MEAN:.*]] = chlo.broadcast_multiply %[[BETA]], %[[BATCH_MEAN]] [all …]
|
D | legalize-tf-binary-elementwise.mlir | 1 // Note that binary elementwise tests are run with chlo legalization enabled 4 // RUN: tf-opt "-xla-legalize-tf=allow-partial-conversion legalize-chlo=true" -canonicalize %s | Fi… 5 // RUN: tf-opt "-xla-legalize-tf=allow-partial-conversion legalize-chlo=false" %s | FileCheck --che… 64 // CHLO: chlo.broadcast_add %arg0, %arg1 268 // CHLO: chlo.broadcast_compare %arg0, %arg1 {comparison_direction = "EQ"} 328 // CHLO: chlo.broadcast_compare %arg0, %arg1 {comparison_direction = "GT"}
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/ |
D | init.cc | 24 registry.insert<mlir::chlo::HloClientDialect, in registerAllMhloDialects()
|
D | chlo_ops.cc | 29 namespace chlo { namespace 383 namespace chlo { namespace
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/tools/mlir-hlo-opt/ |
D | mlir-hlo-opt.cpp | 33 registry.insert<mlir::chlo::HloClientDialect>(); in main()
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/include/mlir-hlo/Dialect/mhlo/transforms/ |
D | rewriters.h | 100 namespace chlo {
|
D | mhlo_passes.td | 18 def ChloLegalizeToHloPass : FunctionPass<"chlo-legalize-to-hlo"> { 23 /*default=*/"false", "Only lower broadcasting chlo to non-broadcasting equivalents">,
|
D | map_chlo_to_hlo_op.h | 26 namespace chlo {
|
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/ |
D | legalize_tf.cc | 76 registry.insert<chlo::HloClientDialect, mhlo::MhloDialect, in getDependentDialects() 713 auto plus_one = builder->create<chlo::BroadcastAddOp>( in CreateWhile32() 1868 auto add_op = rewriter.create<chlo::BroadcastAddOp>( in matchAndRewrite() 2002 Value corrected_variance = rewriter.create<chlo::BroadcastMulOp>( in matchAndRewrite() 2022 auto alpha_mul_old_mean = rewriter.create<chlo::BroadcastMulOp>( in matchAndRewrite() 2025 auto beta_mul_batch_mean = rewriter.create<chlo::BroadcastMulOp>( in matchAndRewrite() 2028 batch_mean = rewriter.create<chlo::BroadcastAddOp>( in matchAndRewrite() 2033 auto alpha_mul_old_variance = rewriter.create<chlo::BroadcastMulOp>( in matchAndRewrite() 2036 auto beta_mul_batch_variance = rewriter.create<chlo::BroadcastMulOp>( in matchAndRewrite() 2039 corrected_variance = rewriter.create<chlo::BroadcastAddOp>( in matchAndRewrite() [all …]
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/ |
D | README.md | 104 * `chlo`: the "client" HLO dialect, intended to be closer to the frontend 115 ### HLO Client Dialect: `chlo`. 145 The `chlo` dialect started originally as mapping to the XLA client Builder APIs. 196 * Legalization from `chlo` dialect or conversion from XLA HLO.
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | legalize_hlo_patterns.td | 47 // Note that these are legalized from chlo.broadcast_* ops, since those are 180 // Note that these are legalized from chlo.broadcast_* ops, since those are
|
/external/tensorflow/tensorflow/compiler/mlir/tools/kernel_gen/ |
D | kernel_creator.cc | 437 registry.insert<mlir::chlo::HloClientDialect, mlir::mhlo::MhloDialect>(); in GenerateKernelForTfCode()
|