Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 62 for IntegerType (0.16 sec)

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

          if (value_shaped_type != nullptr) {
            auto operand_or_result = value_shaped_type.getElementType();
            std::string dtype;
    
            TypeSwitch<Type>(operand_or_result)
                .Case<IntegerType>([&](Type) {
                  dtype =
                      absl::StrCat("i", operand_or_result.getIntOrFloatBitWidth());
                })
                .Case<FloatType>([&](Type) {
                  dtype =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

        *dtype = DT_FLOAT8_E4M3FN;
        return absl::OkStatus();
      } else if (type.isFloat8E5M2()) {
        *dtype = DT_FLOAT8_E5M2;
        return absl::OkStatus();
      } else if (auto itype = mlir::dyn_cast<mlir::IntegerType>(type)) {
        switch (itype.getWidth()) {
          case 1:
            *dtype = DT_BOOL;
            return absl::OkStatus();
          case 4:
            *dtype = itype.isUnsigned() ? DT_UINT4 : DT_INT4;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/convert_type.cc

        } else if (complex_type.getElementType().isF64()) {
          return tflite::TensorType_COMPLEX128;
        }
        llvm_unreachable("invalid complex Type in conversion");
      } else if (auto itype = mlir::dyn_cast<mlir::IntegerType>(type)) {
        switch (itype.getWidth()) {
          case 1:
            return tflite::TensorType_BOOL;
          case 4:
            if (itype.isUnsigned())
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. src/cmd/compile/internal/types2/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.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/legalize_tf.cc

      /// Performs the lowering to TFLite dialect.
      void runOnOperation() override;
    };
    
    // Util that casts 'val' to Int32 by adding a cast Op.
    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: Mon May 20 20:06:54 UTC 2024
    - 45.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

          mlir::cast<ComplexType>(elemType).getElementType().isF32())
        return true;
    
      // QUINT8 and UI8 are allowed.
      if (mlir::isa<TF::Quint8Type>(elemType) ||
          (elemType.isInteger(8) && mlir::cast<IntegerType>(elemType).isUnsigned()))
        return true;
    
      return false;
    }
    
    func::FuncOp CreateOutlineFunc(StringRef name, Region& region,
                                   bool passthru_extra_args, int num_loop_carried,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/tftext_utils.cc

        return func.emitError() << "First input should be a string tensor";
      }
      auto row_splits_type = GetInputType(func, 1);
      if (!row_splits_type ||
          !mlir::isa<IntegerType>(row_splits_type.getElementType())) {
        return func.emitError() << "Second input should be an integer tensor";
      }
    
      auto hash_seed =
          mlir::dyn_cast_or_null<ArrayAttr>(attr.getAttrs().get("hash_seed"));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top