Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 62 for IntegerType (0.27 sec)

  1. tensorflow/compiler/mlir/lite/quantization/device_target.cc

    DeviceTarget::DeviceTarget(MLIRContext* ctx) : ctx_(ctx) {
      f32_ = FloatType::getF32(ctx_);
      i8_ = IntegerType::get(ctx_, k8Bits);
      i8_min_ = QuantizedType::getDefaultMinimumForInteger(kSigned, k8Bits);
      i8_max_ = QuantizedType::getDefaultMaximumForInteger(kSigned, k8Bits);
      i32_ = IntegerType::get(ctx_, k32Bits);
      i32_min_ = QuantizedType::getDefaultMinimumForInteger(kSigned, k32Bits);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/ir/UniformSupport.cc

      int64_t chunk_size =
          std::accumulate(std::next(shape.begin(), quantization_dim_ + 1),
                          shape.end(), 1, std::multiplies<int64_t>());
      Type new_element_type =
          IntegerType::get(attr.getContext(), storage_bit_width_);
      return attr.mapValues(new_element_type, [&](const APFloat &old) {
        int chunk_index = flatten_index / chunk_size;
        flatten_index++;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

          builder_.getF32Type(),
          /*scale=*/1.0,
          /*zeroPoint=*/0, /*storageTypeMin=*/-128, /*storageTypeMax=*/127);
      EXPECT_TRUE(IsSupportedByTfliteQuantizeOrDequantizeOps(
          dyn_cast_or_null<IntegerType>(qi8_type.getStorageType())));
    }
    
    TEST_F(IsSupportedByTfliteQuantizeOrDequantizeOpsTest, StorageTypeI16Succeeds) {
      auto qi16_type = quant::UniformQuantizedType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

      auto etype = op.getType().getElementType();
      if (etype.isa<FloatType>()) {
        return FoldDivOpInternal<APFloat>(op, rewriter);
      }
      if (etype.isa<IntegerType>()) {
        return FoldDivOpInternal<APInt>(op, rewriter);
      }
      return failure();
    }
    }  // namespace
    
    void PopulateFolderPatterns(RewritePatternSet& patternSet) {
      patternSet.add(FoldDivOp);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.h

    // Determines whether the storage type of a quantized type is supported by
    // `tfl.quantize` or `tfl.dequantize` ops. ui8, i8 and i16 are supported.
    bool IsSupportedByTfliteQuantizeOrDequantizeOps(IntegerType storage_type);
    
    // Returns true if a type is quantized tensor type.
    bool IsQuantizedTensorType(Type type);
    
    // Returns true if all operands and results are quantized.
    bool IsOpFullyQuantized(Operation* op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/ir/tf_arith_ops_folder.h

      Attribute identity_attr;
      if (auto ty = mlir::dyn_cast<FloatType>(element_ty)) {
        identity_attr = FloatAttr::get(ty, static_cast<double>(identity));
      } else if (auto ty = mlir::dyn_cast<IntegerType>(element_ty)) {
        identity_attr = IntegerAttr::get(ty, static_cast<int64_t>(identity));
      } else {
        return {};
      }
    
      // Fold: Op(Operand, Identity) -> Operand.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc

                                           Location conversion_loc) const final {
        if (!input.getType().isa<IntegerType>() ||
            !result_type.isa<IntegerType>()) {
          return nullptr;
        }
        auto input_itype = input.getType().cast<IntegerType>();
        auto result_itype = result_type.cast<IntegerType>();
        if (input_itype.getWidth() == result_itype.getWidth()) return nullptr;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Nov 21 16:55:41 UTC 2023
    - 38.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_traits.h

              op->getResult(index).getType().template cast<ShapedType>();
          if (!result_type.getElementType().template isa<FloatType>()) return {};
          Builder builder(op->getContext());
          const IntegerType storage_type = builder.getIntegerType(BitWidth);
          const double scale = static_cast<double>(ScaleMantissa) *
                               std::pow(10.0, static_cast<double>(ScaleExp));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 05 07:39:40 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

        } else {
          return tensorflow::Status(absl::StatusCode::kInvalidArgument,
                                    "Unsupported type");
        }
      } else if (auto itype = mlir::dyn_cast<mlir::IntegerType>(element_type)) {
        if (element_type.isSignedInteger()) {
          switch (itype.getWidth()) {
            case 8:
              return DenseElementsAttr::get<int8_t>(shaped_type,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/device_target.h

          QuantizedMultipliers* output_multipliers, QuantizedRanges* output_ranges);
    
      // A set of parameters are required to build the signatures.
      FloatType f32_;
      IntegerType i8_, i32_;
      int64_t i8_min_, i8_max_, i32_min_, i32_max_;
      quant::AnyQuantizedType any_, qi8_, qi8n_, qi32_;
    
     private:
      // Maps the kernel names to all the available kernels.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 08 10:41:08 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top