Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 158 for getDefiningOp (0.26 sec)

  1. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

          return failure();
        }
        // If there are redundant casts, hoist output of raw data op originating op.
        if (preceding_cast.getArg().getDefiningOp()) {
          auto redundant_cast = preceding_cast.getArg().getDefiningOp<CastOp>();
          if (!redundant_cast || redundant_cast.getArg().getType() !=
                                     preceding_cast.getOut().getType()) {
            return failure();
          }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      if (block_arg_num.has_value()) return block_arg_num;
    
      Value next_input = input;
      auto pad_op = dyn_cast_or_null<TF::PadOp>(next_input.getDefiningOp());
      auto cast_op = dyn_cast_or_null<TF::CastOp>(next_input.getDefiningOp());
    
      while (pad_op || cast_op) {
        if (pad_op) {
          auto block_arg_num = GetBlockArgNum(pad_op.getInput());
          if (block_arg_num.has_value()) return block_arg_num;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h

          auto& tensor_property = enumerated_inputs.second;
    
          Value input = op.getOperand(index);
    
          if (input.getDefiningOp() == nullptr) continue;
    
          // TODO(b/172517537): make this work with non-PTQ case.
          if (llvm::isa<func::ConstantOp, arith::ConstantOp, TFL::ConstOp>(
                  input.getDefiningOp())) {
            // Tensors with derived scale are biases, and handled in propagation.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 28K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/push_transpose_through_ewise.cc

        if (any_blargs) {
          return failure();
        }
    
        auto tpose_arg1 = llvm::dyn_cast_or_null<TFL::TransposeOp>(
            op->getOperand(0).getDefiningOp());
        auto tpose_arg2 = llvm::dyn_cast_or_null<TFL::TransposeOp>(
            op->getOperand(1).getDefiningOp());
    
        if (!tpose_arg1 || !tpose_arg2) {
          return failure();
        }
    
        auto tpose_arg1_type =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/optimize.td

    include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td"
    include "mhlo/IR/hlo_ops.td"
    include "stablehlo/dialect/ChloOps.td"
    
    def IsDefinedByConvOrDotGeneralOp : Constraint<Or<[
      CPred<"$0.getDefiningOp<mhlo::ConvolutionOp>()">,
      CPred<"$0.getDefiningOp<mhlo::DotGeneralOp>()">]>>;
    
    def IsNull : Constraint<CPred<"!$0">>;
    
    // This pattern optimizes:
    //   conv/dot_general + a + b -> conv/dot_general + (a + b)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Feb 24 02:26:47 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/optimize_batch_matmul.cc

    bool NotFromDequant(mlir::Value value) {
      auto dequant_op = value.getDefiningOp<DequantizeOp>();
      if (dequant_op) {
        return false;
      }
      auto split_op = value.getDefiningOp<SplitOp>();
      if (!split_op) {
        return true;
      }
      return !split_op.getValue().getDefiningOp<DequantizeOp>();
    }
    
    // Optimize TFLite operations in functions.
    class OptimizeBatchMatmulPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      auto iota_broadcast =
          dyn_cast_or_null<mhlo::BroadcastInDimOp>(iota.getDefiningOp());
      if (!iota_broadcast || iota_broadcast.getBroadcastDimensions() != dimensions)
        return false;
      if (!isa_and_nonnull<mhlo::IotaOp>(
              iota_broadcast.getOperand().getDefiningOp()))
        return false;
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.td

    // `tf_quant.composite_function` attribute.
    def IsNotInLiftedFunc :
          Constraint<CPred<"!IsInLiftedFunc($0.getDefiningOp())">>;
    
    // Checks if the value is not inside a StableHLO op with region.
    def IsNotInStableHloOpRegion :
          Constraint<CPred<"!IsInStableHloOpRegion($0.getDefiningOp())">>;
    
    // Checks if the given einsum op is supported for XlaDotV2 quantization.
    def IsEinsumSupportedByXlaDotV2 :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Mar 25 00:32:20 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.td

    class AreIntSplatValuesEqual<string type> : Constraint<CPred<
      "AreSplatValuesEqual<"# type #">($0, $1)">>;
    
    // Returns defining op of this value.
    def GetDefiningOp :  NativeCodeCall<"$0.getDefiningOp()">;
    
    // Clones an operation with new operands while keeping attributes.
    def CloneOpWithReplacedOperands : NativeCodeCall<
      "CloneOpWithReplacedOperands("
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 04:55:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc

                                                PatternRewriter &rewriter) {
      auto dot = dyn_cast_or_null<mhlo::DotGeneralOp>(
          reshape_after.getOperand().getDefiningOp());
      if (!dot) return failure();
    
      auto reshape_before =
          dyn_cast_or_null<mhlo::ReshapeOp>(dot.getLhs().getDefiningOp());
      if (!reshape_before) return failure();
    
      if (!dot.getLhs().getType().hasStaticShape() ||
          !dot.getRhs().getType().hasStaticShape() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 26.9K bytes
    - Viewed (0)
Back to top