Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 62 for IntegerType (0.2 sec)

  1. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc

          scales[i] = static_cast<float>(scales[i]);
        }
      }
    
      // Builds the result quantized type, which has signed 32 bits storage type.
      Builder builder(expressed_type.getContext());
      const IntegerType storage_type = builder.getIntegerType(32);
      const int64_t storage_type_min =
          quant::QuantizedType::getDefaultMinimumForInteger(/*isSigned=*/true, 32);
      const int64_t storage_type_max =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 43.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/lower_static_tensor_list.cc

                                           PatternRewriter *rewriter) {
      // Create the start position of slice. This is done by concatenating
      // `start_index` and `partial_start_position` together.
      IntegerType shape_dtype = rewriter->getIntegerType(32);
      RankedTensorType position_type =
          tensorflow::GetTypeFromTFTensorShape({-1}, shape_dtype);
      Value partial_start_position =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 70.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/tpu_space_to_depth_pass.cc

      MLIRContext* context = conv2d.getContext();
      SmallVector<int64_t, 4> values = {1, 1, 1, 1};
      auto attrs = llvm::map_range(values, [context](int64_t v) -> Attribute {
        return IntegerAttr::get(IntegerType::get(context, 64), v);
      });
      // TODO(b/157276506): change type of strides to DenseElementsAttr
      auto strides = ArrayAttr::get(context, llvm::to_vector<4>(attrs));
      conv2d->setAttr("strides", strides);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 29.3K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/collection_ops_util.cc

      int64_t rank = r1.size();
      values.reserve(rank);
      for (int i = 0; i < rank; ++i) values.push_back(APInt(bitwidth, r1[i]));
      auto result_type = tensorflow::GetTypeFromTFTensorShape(
          {rank}, IntegerType::get(builder.getContext(), bitwidth));
      return builder.create<TF::ConstOp>(
          loc, DenseElementsAttr::get(result_type, values));
    }
    
    Value GetIndicesForElement(Value index, Value buffer, OpBuilder builder,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/fused_kernel_matcher.cc

          ArrayAttr targs_attr = ArrayAttr::get(context, targs_values);
          attrs.push_back(
              NamedAttribute(StringAttr::get(context, "TArgs"), targs_attr));
    
          auto num_args_attr = IntegerAttr::get(IntegerType::get(context, 64), 1);
          attrs.push_back(
              NamedAttribute(StringAttr::get(context, "num_args"), num_args_attr));
    
          // Fused conv operands are input, filter, args and host args. Here, bias
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/stablehlo/transforms/compose_uniform_quantized_type_pass.cc

                                << zero_points_type << ".\n");
        return failure();
      }
    
      if (Type zero_points_element_type = zero_points_type.getElementType();
          !mlir::isa<IntegerType>(zero_points_element_type)) {
        LLVM_DEBUG(llvm::dbgs() << "Zero point should be an integer type. Got: "
                                << zero_points_element_type << ".\n");
        return failure();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 64.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/stablehlo/passes/quantization_patterns.cc

            if (auto dq_op = dyn_cast_or_null<quantfork::DequantizeCastOp>(
                    operand.getDefiningOp())) {
              inputs.push_back(dq_op.getOperand());
            } else if (isa<IntegerType>(element_type)) {
              // If the operand is an integer tensor, then it doesn't require the
              // DequantizeOp in the pattern.
              inputs.push_back(operand);
            } else {
              return;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 06:04:36 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

          float const_value;
          if (failed(GetConstantSplatValue<float>(init_value, const_value)) ||
              const_value != 1.0)
            return failure();
        } else if (mlir::isa<IntegerType>(type) && type.isSignlessInteger()) {
          int32_t const_value;
          if (failed(GetConstantSplatValue<int32_t>(init_value, const_value)) ||
              const_value != 1)
            return failure();
        } else {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform_patterns.cc

      }
    
      int64_t value = attr.getInt();
      if (value > std::numeric_limits<int>::max() ||
          value < std::numeric_limits<int>::min()) {
        return failure();
      }
    
      *attr_i32 = IntegerAttr::get(
          IntegerType::get(attr.getContext(), /*width=*/32), value);
      return success();
    }
    
    TFL::ReshapeOp InsertReshapeOp(Location loc, Value input, Type element_type,
                                   llvm::ArrayRef<int64_t> new_shape_array,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/ir/tf_op_base.td

    def TF_DerivedResultShapeAttr : DerivedAttr<"ShapedType",
      "return (*getOperation()->result_type_begin()).cast<ShapedType>();",
      [{ mlir::TF::ShapeAttr::get($_ctxt, $_self) }]>;
    
    def TF_IntTypeAttr : TypeAttrBase<"IntegerType", "integer type"> {
      let returnType = "Type";
    }
    
    //===----------------------------------------------------------------------===//
    // TensorFlow common builders
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 30 06:52:55 UTC 2023
    - 30.5K bytes
    - Viewed (0)
Back to top