Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 71 for FloatType (0.14 sec)

  1. tensorflow/compiler/mlir/python/mlir_wrapper/types.cc

          .def("getResults",
               [](mlir::FunctionType& ft) { return ft.getResults().vec(); });
    
      py::class_<mlir::FloatType, mlir::Type>(m, "FloatType")
          .def("getBF16", &mlir::FloatType::getBF16)
          .def("getF16", &mlir::FloatType::getF16)
          .def("getF32", &mlir::FloatType::getF32)
          .def("getF64", &mlir::FloatType::getF64);
    
      py::class_<mlir::IntegerType, mlir::Type>(m, "IntegerType")
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jan 12 08:42:26 UTC 2021
    - 2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

          {Eigen::half(1.0)}, DT_HALF, mlir::FloatType::getF16(&context)));
      ASSERT_NO_FATAL_FAILURE(
          VerifyConversion<bfloat16>({bfloat16(1.0), bfloat16(-1.0)}, DT_BFLOAT16,
                                     mlir::FloatType::getBF16(&context)));
      ASSERT_NO_FATAL_FAILURE(VerifyConversion<float>(
          {1.0, -1.0}, DT_FLOAT, mlir::FloatType::getF32(&context)));
      ASSERT_NO_FATAL_FAILURE(VerifyConversion<double>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.pyi

        def getFunctionType(self, arg0: list[Type], arg1: list[Type]) -> FunctionType: ...
    
    class FloatType(Type):
        def __init__(self, *args, **kwargs) -> None: ...
        def getBF16(self) -> FloatType: ...
        def getF16(self) -> FloatType: ...
        def getF32(self) -> FloatType: ...
        def getF64(self) -> FloatType: ...
    
    class FuncOp:
        def __init__(self, *args, **kwargs) -> None: ...
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Oct 09 17:10:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue51658.go

    }
    
    // test case from issue
    
    type FloatType { // ERRORx "expected type|type declaration"
    	float32 | float64
    } // ERRORx "expected declaration|non-declaration statement"
    
    type IntegerType interface {
    	int8 | int16 | int32 | int64 | int |
    		uint8 | uint16 | uint32 | uint64 | uint
    }
    
    type ComplexType interface {
    	complex64 | complex128
    }
    
    type Number interface {
    	FloatType | IntegerType | ComplexType
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 1016 bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

      if (element_type.isF16()) {
        auto floatType = mlir::FloatType::getF16(element_type.getContext());
        auto floatAttr = mlir::FloatAttr::get(floatType, static_cast<float>(value));
        std::vector<Attribute> floatValues({floatAttr});
        return DenseElementsAttr::get(shaped_type, floatValues);
      } else if (element_type.isBF16()) {
        auto floatType = mlir::FloatType::getBF16(element_type.getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc

      return UniformQuantizedType::getChecked(
          loc, /*flags=*/QuantizationFlags::Signed,
          /*storageType=*/IntegerType::get(&context, /*width=*/8),
          /*expressedType=*/FloatType::getF32(&context), scale, zero_point,
          /*storageTypeMin=*/llvm::minIntN(8) + (narrow_range ? 1 : 0),
          /*storageTypeMax=*/llvm::maxIntN(8));
    }
    
    UniformQuantizedType CreateI32F32UniformQuantizedType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

    // given element type and the integer value.
    template <typename T>
    DenseElementsAttr GetScalarOfType(Type ty, T raw_value) {
      RankedTensorType scalar_ty = RankedTensorType::get({}, ty);
      if (auto float_ty = mlir::dyn_cast<FloatType>(ty)) {
        FloatAttr attr = FloatAttr::get(float_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/utils/attribute_utils.cc

    #include "mlir/Support/LLVM.h"  // from @llvm-project
    
    namespace mlir {
    namespace TFL {
    
    FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr) {
      if (attr.getShapedType().getNumElements() != 1 ||
          !mlir::isa<FloatType>(attr.getShapedType().getElementType())) {
        return {};
      }
      return attr.getSplatValue<FloatAttr>();
    }
    
    FloatAttr GetSingleElementAsFloatOrSelf(Attribute attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

      if (!tensorArg) return emitOpError("arg needs to be tensor type.");
    
      // Verify layerStats attribute.
      {
        auto layerStatsType = getLayerStats().getShapedType();
        if (!mlir::isa<FloatType>(layerStatsType.getElementType())) {
          return emitOpError("layerStats must have a floating point element type");
        }
        if (layerStatsType.getRank() != 1 || layerStatsType.getDimSize(0) != 2) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc

      if (!tensorArg) return emitOpError("arg needs to be tensor type.");
    
      // Verify layerStats attribute.
      {
        auto layerStatsType = getLayerStats().getShapedType();
        if (!mlir::isa<FloatType>(layerStatsType.getElementType())) {
          return emitOpError("layerStats must have a floating point element type");
        }
        if (layerStatsType.getRank() != 1 || layerStatsType.getDimSize(0) != 2) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top