Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 178 for getDefiningOp (0.13 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/reduce.cc

          value_select.getOperand(0).getDefiningOp());
      if (!value_gt ||
          value_gt.getComparisonDirection() != compare_direction_included ||
          value_gt.getLhs() != body.getArgument(0) ||
          value_gt.getRhs() != body.getArgument(2))
        return failure();
    
      mhlo::SelectOp index_select = llvm::dyn_cast_or_null<mhlo::SelectOp>(
          return_op.getOperand(1).getDefiningOp());
      if (!index_select) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 20:53:17 UTC 2024
    - 8K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

            cast<stablehlo::SubtractOp>(op.getOperand(0).getDefiningOp());
        auto input1_i8_to_i32_convert_op = cast<stablehlo::ConvertOp>(
            input1_zero_point_subtract_op.getOperand(0).getDefiningOp());
        auto input1_uniform_quantize_call_op = cast<func::CallOp>(
            input1_i8_to_i32_convert_op.getOperand().getDefiningOp());
        auto input1_uniform_quantize_call_pattern =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold.cc

      SmallVector<ElementsAttr> inputs;
      for (auto operand : op->getOperands()) {
        auto preceding_const_op = operand.getDefiningOp<TF::ConstOp>();
        if (preceding_const_op) {
          inputs.push_back(preceding_const_op.getValue());
          continue;
        }
    
        Operation* preceding_op = operand.getDefiningOp();
        int preceding_result_id = -1;
        for (auto preceding_result : preceding_op->getResults()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool_patterns.td

    
    // See the function doc in the header file.
    def GetPadOpType : NativeCodeCall<
      "GetPadOpType((*$0.begin()).getDefiningOp<mhlo::CompositeOp>())">;
    
    // See the function doc in the header file.
    def GetAvgPoolOpPadAttr: 
      NativeCodeCall<"GetAvgPoolOpPadAttr($_builder, (*$0.begin()).getDefiningOp<mhlo::CompositeOp>())">;
    
    // Returns true if the provided padding in the composite op can *not* be 
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  5. 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)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/fuse_convolution_pass.cc

        Value rhs = mul_op.getRhs();
        conv_op = lhs.getDefiningOp<mhlo::ConvolutionOp>();
        if (conv_op == nullptr) {
          return failure();
        }
        filter = conv_op.getRhs().getDefiningOp<mhlo::ConstantOp>();
        if (filter == nullptr) {
          return failure();
        }
        // Try to match static broadcast or dynamic broadcast.
        bcast_or_const_op = rhs.getDefiningOp();
        bool is_dynamic_broadcast =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 22:21:19 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_reorder_replicate_and_partitioned_inputs.cc

        TF::TPUReplicatedInputOp replicated_input) {
      if (!llvm::all_of(replicated_input.getInputs(), [](Value input) {
            return llvm::isa_and_nonnull<TF::TPUPartitionedInputV2Op>(
                input.getDefiningOp());
          }))
        return replicated_input.emitOpError()
               << "expects all inputs from 'tf.TPUPartitionedInputV2' ops";
    
      const auto metadata_iter =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 24 23:08:55 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top