Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for value_begin (0.39 sec)

  1. tensorflow/compiler/mlir/lite/stablehlo/transforms/tflite_legalize_hlo.cc

          return false;
        if (mlir::isa<FloatType>(element_type)) {
          auto value = *attr.value_begin<APFloat>();
          return value.isNegative() && value.isInfinity();
        } else if (element_type.isInteger(1)) {
          auto value = *attr.value_begin<APInt>();
          return value.isZero();
        } else {
          auto value = *attr.value_begin<APInt>();
          return element_type.isUnsignedInteger() ? value.isMinValue()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/stablehlo/transforms/hlo_matchers.cc

      if (!matchPattern(iota, m_Constant(&iota_const_attr))) return false;
    
      auto iota_type = iota_const_attr.getType();
      auto iota_shape = iota_type.getShape();
      auto reduce_dim = (*dimensions.value_begin<APInt>()).getSExtValue();
      if (reduce_dim < 0) reduce_dim += iota_type.getRank();
    
      auto index =
          std::optional<SmallVector<int64_t>>(std::in_place, iota_type.getRank());
      while (index.has_value()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize_functional_ops.cc

        if (!cond_type || !cond_type.getShape().equals({}) ||
            !cond_type.getElementType().isInteger(/*width=*/1))
          return failure();
    
        // Identify the branch to inline.
        bool cond_value = (*cond.value_begin<APInt>()).getSExtValue();
        func::FuncOp func = cond_value ? then_func : else_func;
    
        // Make sure that the function has exactly one block to simplify inlining.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/decompose_resource_ops.cc

        }
    
        if (alg_constant.getNumElements() != 1) {
          return rewriter.notifyMatchFailure(op, "expected alg to be a scalar");
        }
    
        uint64_t alg_value = ((*alg_constant.value_begin<APInt>()).getZExtValue());
        tensorflow::ConcreteRngAlgorithm alg;
        if (tensorflow::RNG_ALG_PHILOX == alg_value) {
          alg = tensorflow::ConcreteRngAlgorithm::RNG_ALG_PHILOX;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 8.1K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          return false;
        if (mlir::isa<FloatType>(element_type)) {
          auto value = *attr.value_begin<APFloat>();
          return value.isNegative() && value.isInfinity();
        } else if (element_type.isInteger(1)) {
          auto value = *attr.value_begin<APInt>();
          return value.isZero();
        } else {
          auto value = *attr.value_begin<APInt>();
          return element_type.isUnsignedInteger() ? value.isMinValue()
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/optimize.cc

            new_bias_values.resize(bias_size, *bias_cst.value_begin<APFloat>());
          } else if (bias_cst.getNumElements() == bias_size) {  // 1-d bias, copy it
            new_bias_values.insert(new_bias_values.begin(),
                                   bias_cst.value_begin<APFloat>(),
                                   bias_cst.value_end<APFloat>());
          } else {
            return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 102.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

        TFL::TransposeOp::build(
            *builder, result, UnrankedTensorType::get(input_type.getElementType()),
            input, perm);
        return;
      }
    
      const auto perm_value_it = perm_const.value_begin<APInt>();
    
      const ArrayRef<int64_t> input_shape = input_type.getShape();
      SmallVector<int64_t, 4> output_shape(input_shape.size());
    
      for (int i = 0; i < output_shape.size(); ++i) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
Back to top