Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for isF16 (0.03 sec)

  1. tensorflow/compiler/mlir/lite/transforms/unfold_large_splat_constant.cc

        if (!splat_elements_attr) {
          return;
        }
        auto element_type = splat_elements_attr.getType().getElementType();
        if (!(element_type.isF32() || element_type.isF16() ||
              element_type.isInteger(1) || element_type.isInteger(32) ||
              element_type.isInteger(64))) {
          return;
        }
        if (splat_elements_attr.getNumElements() *
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/utils/constant_utils.cc

    #include "tsl/platform/statusor.h"
    
    namespace mlir {
    namespace TFL {
    
    absl::StatusOr<TypedAttr> CreateTypedAttr(ShapedType shaped_type, int value) {
      Type element_type = shaped_type.getElementType();
      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});
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/optimize_op_order.cc

          return failure();
        }
        Type input_element_type = getElementTypeOrSelf(dequantize_op.getInput());
        // Most passthrough ops do not support F16.
        if (input_element_type.isF16()) {
          return failure();
        }
    
        // Set the output type of the dequantize op and push it down.
        dequantize_op.getOutput().setType(output_type);
        passthrough_op->replaceAllUsesWith(dequantize_op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/utils/validators.h

    inline bool TFTypeIsHalfTensor(Value value) {
      auto tensorType = mlir::dyn_cast<TensorType>(value.getType());
      if (!tensorType) return false;
      return tensorType.getElementType().isF16();
    }
    
    // Returns true iff the given value is a f16 or bf16 tensor.
    inline bool TFTypeIsBFloat16OrHalfTensor(Value value) {
      return TFTypeIsBFloat16Tensor(value) || TFTypeIsHalfTensor(value);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/convert_type.cc

          return errors::Unimplemented(absl::StrCat(
              "Converting DataType '", DataTypeString(dtype), "' to MLIR Type"));
      }
    }
    
    Status ConvertScalarTypeToDataType(Type type, DataType* dtype) {
      if (type.isF16()) {
        *dtype = DT_HALF;
        return absl::OkStatus();
      } else if (type.isF32()) {
        *dtype = DT_FLOAT;
        return absl::OkStatus();
      } else if (type.isF64()) {
        *dtype = DT_DOUBLE;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/utils/convert_type.cc

    #include "tensorflow/core/platform/errors.h"
    
    namespace tflite {
    
    using absl::StatusOr;
    
    namespace errors = tensorflow::errors;
    
    tflite::TensorType ConvertTypeToTensorType(mlir::Type type) {
      if (type.isF16()) {
        return tflite::TensorType_FLOAT16;
      } else if (type.isBF16()) {
        return tflite::TensorType_BFLOAT16;
      } else if (type.isF32()) {
        return tflite::TensorType_FLOAT32;
      } else if (type.isF64()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 23:04:40 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top