Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 83 for getDefiningOp (0.17 sec)

  1. tensorflow/compiler/mlir/quantization/stablehlo/passes/defer_activation_transpose.cc

        return IsTransposeOpWithPermuation(lhs.getDefiningOp(),
                                           kNhwcToNchwPermutation);
      }
    
      // Pushes the transpose op at the input to the result.
      void rewrite(mlir::stablehlo::ReduceWindowOp op,
                   PatternRewriter& rewriter) const override {
        auto transpose_op = cast<TransposeOp>(op.getOperand(0).getDefiningOp());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold_test.cc

      auto mul_op = dyn_cast_or_null<TF::MulOp>(results[0].getDefiningOp());
      EXPECT_THAT(mul_op, NotNull());
      // Even though the preceding CastOp is foldable, it shouldn't be folded since
      // we are calling from the MulOp.
      EXPECT_TRUE(isa<TF::CastOp>(mul_op.getX().getDefiningOp()));
    }
    
    TEST_F(ConstantFoldingTest, NotFoldingArgument) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/reduce_while_operands.cc

        queue.pop_back();
        if (auto arg = mlir::dyn_cast_or_null<BlockArgument>(node)) {
          neighbors.push_back(arg.getArgNumber());
          continue;
        }
        if (!node.getDefiningOp()) continue;
        for (Value operand : node.getDefiningOp()->getOperands()) {
          if (visited.contains(operand)) continue;
          queue.push_back(operand);
          visited.insert(operand);
        }
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

    }
    
    template <typename Op, typename ElementType = Type, typename ValType,
              typename Convert>
    static Attribute BinaryFolder(Op *op) {
      auto lhs_op = op->getLhs().template getDefiningOp<mhlo::ConstantOp>();
      auto rhs_op = op->getRhs().template getDefiningOp<mhlo::ConstantOp>();
      if (!lhs_op || !lhs_op) return {};
    
      auto lhs = dyn_cast_or_null<DenseElementsAttr>(lhs_op.getValue());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  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