- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 18 for isF16 (0.06 sec)
-
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) -
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) -
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) -
tensorflow/compiler/mlir/lite/transforms/dense_to_sparse.cc
format_converter.DenseToSparse(data.data()); sparsity = GetSparsity(type.getNumElements() - format_converter.GetData().size(), type.getNumElements()); } else if (type.getElementType().isF16()) { tflite::internal::sparsity::FormatConverter<Eigen::half> format_converter( shape, traversal_order, format, b_size, b_map); std::vector<Eigen::half> data; data.reserve(type.getNumElements());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16.1K bytes - Viewed (0) -
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) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
switch (elem_type.getIntOrFloatBitWidth()) { case 16: { assert(bytes_len % 2 == 0); // Supports both BF16 and F16. assert(elem_type.isF16() || elem_type.isBF16()); int elem_count = bytes_len / 2; if (elem_type.isF16()) { std::vector<Eigen::half> values; values.reserve(elem_count); const char* data = reinterpret_cast<const char*>(buffer.data());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 23:04:40 UTC 2024 - 16.6K bytes - Viewed (0) -
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) -
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) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/quantize_weight.cc
const ShapedType new_result_type = mlir::dyn_cast<ShapedType>(convert_op.getType()); // Proceeds only if the converting is to float16. if (!new_result_type.getElementType().isF16()) continue; // Convert values. std::vector<Eigen::half> new_values; const DenseFPElementsAttr value_attr = mlir::cast<DenseFPElementsAttr>(op.getValue());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc
} bool IsCompatibleTypeWithTFLCastOp(Type type) { auto elemType = getElementTypeOrSelf(type); // F16, F32, F64, BF16 types are allowed. if (elemType.isBF16() || elemType.isF16() || elemType.isF32() || elemType.isF64()) return true; // I1, I4, I8, I16, I32, I64 types are allowed. if (elemType.isInteger(1) || elemType.isInteger(4) || elemType.isInteger(8) ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0)