Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for IntegerType (0.29 sec)

  1. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

          {1, 2}, DT_UINT8,
          mlir::IntegerType::get(
              &context, 8, mlir::IntegerType::SignednessSemantics::Unsigned)));
      ASSERT_NO_FATAL_FAILURE(VerifyConversion<uint16>(
          {1, 2}, DT_UINT16,
          mlir::IntegerType::get(
              &context, 16, mlir::IntegerType::SignednessSemantics::Unsigned)));
      ASSERT_NO_FATAL_FAILURE(VerifyConversion<uint32>(
          {1, 2}, DT_UINT32,
          mlir::IntegerType::get(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc

      bool is_signed = true;
      if (tensor.type == tflite::TensorType_UINT8) {
        is_signed = false;
        storage_type = mlir::IntegerType::get(builder.getContext(), 8);
      }
    
      if (!storage_type) {
        const mlir::Type raw_elem_type = ConvertElementType(tensor.type, builder);
        if (!mlir::isa<mlir::IntegerType>(raw_elem_type)) {
          return absl::InvalidArgumentError(
              "Quantized tensors must be stored as integers");
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/utils.h

                                      .getSExtValue()]);
        }
      }
    
      return mlir::DenseElementsAttr::get(
          RankedTensorType::get(
              {static_cast<int>(new_permutation.size())},
              mlir::IntegerType::get(permutation1.getContext(), 32)),
          llvm::ArrayRef(new_permutation));
    }
    
    // Utility function to map final permutation to initial permutation
    // initial -> permutation1 -> permutation2 -> final
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 00:40:15 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc

      if (mlir::isa<FloatType>(etype)) {
        result =
            BinaryFolder<mhlo::MulOp, FloatType, APFloat, std::multiplies<APFloat>>(
                &op);
      } else if (mlir::isa<IntegerType>(etype)) {
        result =
            BinaryFolder<mhlo::MulOp, IntegerType, APInt, std::multiplies<APSInt>>(
                &op);
      }
      if (result == Attribute()) return failure();
      Value new_const_op = rewriter.create<mhlo::ConstantOp>(op.getLoc(), result);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  5. src/unsafe/unsafe.go

    // part of the unsafe package. It represents the type of an arbitrary Go expression.
    type ArbitraryType int
    
    // IntegerType is here for the purposes of documentation only and is not actually
    // part of the unsafe package. It represents any arbitrary integer type.
    type IntegerType int
    
    // Pointer represents a pointer to an arbitrary type. There are four special operations
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:45:20 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  6. 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)
  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/lite/stablehlo/transforms/legalize_hlo_conversions/util.cc

      return rewriter.create<mhlo::TransposeOp>(value.getLoc(), type, value,
                                                permutation);
    }
    
    Value CreateCastToInt32(Value val, Location loc, PatternRewriter& rewriter) {
      IntegerType new_ele_type = rewriter.getIntegerType(32);
      if (auto shaped_type = mlir::dyn_cast<RankedTensorType>(val.getType())) {
        ShapedType new_type =
            RankedTensorType::get(shaped_type.getShape(), new_ele_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc

            if (auto attr = inst.getAttrOfType<mlir::ElementsAttr>(attr_id)) {
              mlir::Attribute rand_val;
              mlir::Type element_type = attr.getShapedType().getElementType();
              if (mlir::isa<mlir::IntegerType>(element_type)) {
                rand_val = mlir::IntegerAttr::get(element_type, std::rand());
              } else if (element_type.isF16() || element_type.isF32() ||
                         element_type.isF64()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 11:51:44 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. src/go/types/builtins.go

    		x.mode = value
    		x.typ = &emptyInterface
    		if check.recordTypes() {
    			check.recordBuiltinType(call.Fun, makeSig(x.typ))
    		}
    
    	case _Add:
    		// unsafe.Add(ptr unsafe.Pointer, len IntegerType) unsafe.Pointer
    		check.verifyVersionf(call.Fun, go1_17, "unsafe.Add")
    
    		check.assignment(x, Typ[UnsafePointer], "argument to unsafe.Add")
    		if x.mode == invalid {
    			return
    		}
    
    		y := args[1]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.2K bytes
    - Viewed (0)
Back to top