Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for ComplexType (0.15 sec)

  1. src/internal/types/testdata/fixedbugs/issue51658.go

    type IntegerType interface {
    	int8 | int16 | int32 | int64 | int |
    		uint8 | uint16 | uint32 | uint64 | uint
    }
    
    type ComplexType interface {
    	complex64 | complex128
    }
    
    type Number interface {
    	FloatType | IntegerType | ComplexType
    }
    
    func GetDefaultNumber[T Number](value, defaultValue T) T {
    	if value == 0 {
    		return defaultValue
    	}
    	return value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 1016 bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

        case DT_BFLOAT16:
          *type = builder.getBF16Type();
          return absl::OkStatus();
        case DT_COMPLEX64:
          *type = mlir::ComplexType::get(builder.getF32Type());
          return absl::OkStatus();
        case DT_COMPLEX128:
          *type = mlir::ComplexType::get(builder.getF64Type());
          return absl::OkStatus();
        case tensorflow::DT_FLOAT8_E4M3FN:
          *type = builder.getFloat8E4M3FNType();
    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

          return builder.getI1Type();
        case tflite::TensorType_INT16:
          return builder.getIntegerType(16);
        case tflite::TensorType_COMPLEX64:
          return mlir::ComplexType::get(builder.getF32Type());
        case tflite::TensorType_COMPLEX128:
          return mlir::ComplexType::get(builder.getF64Type());
        case tflite::TensorType_INT4:
          return builder.getIntegerType(4);
        case tflite::TensorType_INT8:
    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/utils/variables_utils.cc

      return IsSupportedVariableType(type);
    }
    
    bool IsSupportedVariableType(ShapedType type) {
      auto element_type = type.getElementType();
      // Check complex types.
      if (auto complex_type = element_type.dyn_cast<mlir::ComplexType>()) {
        auto complex_element_type = complex_type.getElementType();
        if (complex_element_type.isF32() || complex_element_type.isF64())
          return true;
      }
      // Check quantized types.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jun 21 19:32:03 UTC 2021
    - 2.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/unfold_splat_constant_pass.cc

        if (!splat_elements_attr) {
          return;
        }
        if (splat_elements_attr.getNumElements() == 1) {
          return;
        }
        auto element_type = splat_elements_attr.getType().getElementType();
        if (mlir::isa<ComplexType>(element_type) ||
            mlir::isa<quant::QuantizedType>(element_type)) {
          return;
        }
        op_builder->setInsertionPoint(const_op);
        Value scalar = op_builder->create<mhlo::ConstantOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

      } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) {
        IntegerAttr attr = IntegerAttr::get(int_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto complex_ty = mlir::dyn_cast<ComplexType>(ty)) {
        Type complex_element_ty = complex_ty.getElementType();
        if (complex_element_ty.isF32()) {
          return DenseElementsAttr::get(
              scalar_ty, static_cast<std::complex<float>>(raw_value));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/utils/convert_tensor_test.cc

      ASSERT_NO_FATAL_FAILURE(VerifyConversion<std::complex<float>>(
          {{0.0, 1.0}, {1.0, 0.0}}, DT_COMPLEX64,
          mlir::ComplexType::get(mlir::FloatType::getF32(&context))));
      ASSERT_NO_FATAL_FAILURE(VerifyConversion<std::complex<double>>(
          {{0.0, 1.0}, {1.0, 0.0}}, DT_COMPLEX128,
          mlir::ComplexType::get(mlir::FloatType::getF64(&context))));
    }
    
    bool IsSplat(mlir::ElementsAttr attr) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

          elemType.isInteger(16) || elemType.isInteger(32) ||
          elemType.isInteger(64))
        return true;
    
      // Complex<F<32>> is allowed.
      if (mlir::isa<ComplexType>(elemType) &&
          mlir::cast<ComplexType>(elemType).getElementType().isF32())
        return true;
    
      // QUINT8 and UI8 are allowed.
      if (mlir::isa<TF::Quint8Type>(elemType) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/optimize.td

      "  $0.getType().cast<RankedTensorType>().getRank() - 1)">]>>;
    
    def IsNotComplexType : Constraint<And<[
      CPred<"$0.getType().isa<RankedTensorType>()">,
      CPred<"!$0.getType().cast<ShapedType>().getElementType().isa<ComplexType>()">
    ]>>;
    
    // Only fuse multiplier if all dimensions other than the channel dimension
    // are equal to 1.
    def CanFuseMulAndConv2D :
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Apr 22 07:31:23 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

        return DenseElementsAttr::get<float>(shaped_type,
                                             static_cast<float>(value));
      } else if (auto complex_type =
                     mlir::dyn_cast<mlir::ComplexType>(element_type)) {
        auto etype = complex_type.getElementType();
        if (etype.isF32()) {
          tensorflow::TensorProto repr;
          repr.set_dtype(tensorflow::DT_COMPLEX64);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
Back to top