Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 33 for getOperands (0.22 sec)

  1. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

      LogicalResult rewriteOpWithDynamicInput(Operation* op,
                                              PatternRewriter& rewriter) const {
        auto cond = op->getOperand(0);
        auto lhs = op->getOperand(1);
        auto rhs = op->getOperand(2);
        auto out = op->getResult(0);
    
        // Matches fail when lhs|rhs|cond is unranked tensor.
        // TODO(b/176202543): Support unranked tensor.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/transforms/outline_composites.cc

        if (!erf_user_user_input) return failure();
    
        // Check `mul 0.5` and `mul 1/sqrt(2)` refer to the same input.
        if (erf_user_user_input->getOperand(0) != erf_input->getOperand(0)) {
          return failure();
        }
    
        // Check the structural matches have the correct op type and values.
        auto rhs_mul = llvm::dyn_cast_or_null<stablehlo::MulOp>(erf_input);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/ir/tfl_ops.td

          Or<[TFL_OperandIsUnrankedPred<0>,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() <= 1">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && !$_op.getOperand(0).getType().cast<ShapedType>().hasStaticShape()">,
              CPred<"$_op.getOperand(0).getType().cast<ShapedType>().getRank() == 2 && $_op.getOperand(0).getType().cast<ShapedType>().getShape()[1] <= 4">]>>]> {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 19:09:08 UTC 2024
    - 186K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_utils.cc

      output_shape[1] = composite_result_shape[2];
      output_shape[2] = composite_result_shape[3];
      output_shape[3] = composite_result_shape[1];
    
      auto input_type = mlir::cast<ShapedType>(old_op->getOperand(0).getType());
    
      return RankedTensorType::get(output_shape, input_type.getElementType());
    }
    }  // namespace odml
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 29 18:33:05 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_lifting.cc

        }
      }
    
      if (!is_supported_affine_op) return failure();
    
      // Bind input, output and weight to the given values.
      binding_output = op->getResult(0);
      binding_input = op->getOperand(0);
      binding_weight = op->getOperand(1);
      return success();
    }
    
    // Makes the 1D value broadcastable with the `rhs_shape`.
    Value MakeOneDimValueBroadcastable(OpBuilder& builder, Location loc,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/attribute_utils.h

    bool GetValueAsConstant(Value val, AttrT &attr) {
      while (auto result = mlir::dyn_cast<OpResult>(val)) {
        Operation *op = result.getOwner();
        if (!isa<IdentityOp>(op) && !isa<IdentityNOp>(op)) break;
        val = op->getOperand(result.getResultNumber());
      }
      return matchPattern(val, m_Constant(&attr));
    }
    
    // Checks if both compilation and replication attributes are present in the
    // operation, and if their values are valid.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_to_vhlo.cc

                                                TypeConverter &converter,
                                                IRRewriter &rewriter) {
      for (int i = 0; i < op->getNumOperands(); ++i) {
        auto operand = op->getOperand(i);
        auto new_operand = converter.materializeArgumentConversion(
            rewriter, op->getLoc(), converter.convertType(operand.getType()),
            {operand});
        op->setOperand(i, new_operand);
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 19:48:51 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/composite_avg_pool.cc

    TorchAvgPoolData GetTorchAvgPoolData(CompositeOp op) {
      auto composite_attrs = op.getCompositeAttributes();
      TorchAvgPoolData data;
    
      auto op_type = mlir::cast<RankedTensorType>(op.getOperand(0).getType());
    
      data.n = op_type.getShape()[0];
      data.c = op_type.getShape()[1];
      data.h_in = op_type.getShape()[2];
      data.w_in = op_type.getShape()[3];
    
      std::vector<int32_t> kernel_size;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 23:16:05 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/api/v1/compile_mlir_util.cc

          mlir::Value return_val = return_op->getOperand(idx);
          if (auto owner = mlir::dyn_cast_or_null<mlir::tensor::CastOp>(
                  return_val.getDefiningOp())) {
            // For bounded dynamic type, get a static size by taking bounds as the
            // dimensions. These dimensions are marked as dynamic in xla::Shape
            // below.
            buffer_ty = GetBufferType(owner.getOperand().getType());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 21 17:24:39 UTC 2024
    - 45.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/utils/export_utils.cc

      auto op_name = std::move(op_name_or_status).value();
      if (op_name == "NextIteration")
        return mlir::isa<mlir::TF::TensorFlowRefType>(
            mlir::getElementTypeOrSelf(op->getOperand(0).getType()));
    
      if (op_name == "Enter" || op_name == "Exit" || op_name == "Switch" ||
          op_name == "Merge") {
        return mlir::isa<mlir::TF::TensorFlowRefType>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 19.7K bytes
    - Viewed (0)
Back to top