- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 78 for DenseElementsAttr (0.23 sec)
-
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
case 8: return DenseElementsAttr::get<int8_t>(shaped_type, static_cast<int8_t>(value)); break; case 16: return DenseElementsAttr::get<int16_t>(shaped_type, static_cast<int16_t>(value)); break; case 32: return DenseElementsAttr::get<int32_t>(shaped_type,
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/utils/utils.h
} // Utility function to map final permutation to initial permutation // initial -> permutation1 -> permutation2 -> final inline DenseElementsAttr RemapPermutation(Value permutation1, DenseElementsAttr perm2_const) { SmallVector<int32_t> initial_permutation; DenseElementsAttr perm1_const; SmallVector<int32_t> new_permutation; if (matchPattern(permutation1, m_Constant(&perm1_const))) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_operator.h
template <typename T> inline std::vector<T> GetVector(DenseElementsAttr elements); // TODO(zichuanwei@): for each type, we need to make sure the element type // matches the expected type otherwise an error should be thrown, but for now // we're just returning empty vector template <> inline std::vector<bool> GetVector(DenseElementsAttr elements) { auto type = elements.getType();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu May 16 21:00:09 UTC 2024 - 11.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.h
/// -> (IntegerAttr, outConvertedType: i8) /// 2. realValue is an elements attribute: /// (realValue: DenseElementsAttr[tensor<2x2xf32>], /// quantizedElementType: UniformQuantizedType[i8:f32]) /// -> (DenseElementsAttr[tensor<2x2xi8>], outConvertedType: tensor<2x2xi8>) Attribute quantizeAttr(Attribute realValue, quant::QuantizedType quantizedElementType,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Jul 29 18:55:28 UTC 2022 - 3.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
return DenseElementsAttr::get(scalar_ty, attr); } 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(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/utils/convert_tensor.cc
return ElementsAttr(mlir::DenseElementsAttr::get( type, llvm::ArrayRef(arr.data(), arr.size()))); } ElementsAttr ConvertTensorOfCustomFloatType(const Tensor& tensor, RankedTensorType type) { auto buffer = llvm::ArrayRef(static_cast<char*>(tensor.data()), tensor.TotalBytes()); return mlir::DenseElementsAttr::getFromRawBuffer(type, buffer); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 20.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/fold_broadcast_pass.cc
auto rhs_op = op->getRhs().template getDefiningOp<mhlo::ConstantOp>(); if (!lhs_op || !lhs_op) return {}; auto lhs = dyn_cast_or_null<DenseElementsAttr>(lhs_op.getValue()); auto rhs = dyn_cast_or_null<DenseElementsAttr>(rhs_op.getValue()); if (!lhs || !rhs) return {}; ShapedType type = mlir::cast<ShapedType>(op->getType()); if (!type.hasStaticShape()) { return {}; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/utils/tf_type_utils.h
#include "mlir/IR/Types.h" // from @llvm-project #include "mlir/Support/LogicalResult.h" // from @llvm-project namespace mlir::quant::tensorflow { // GetDenseAttrFromTensorProtoAttr returns DenseElementsAttr from tensor proto. FailureOr<mlir::DenseElementsAttr> GetDenseAttrFromTensorProtoAttr( llvm::StringRef mangled_tensor_proto, TensorType result_tensor_type); // Check if a type is TF qint type. bool IsTFQintType(Type type);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 08:32:43 UTC 2024 - 1.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/const_tensor_utils.cc
mlir::Type element_ty = getElementTypeOrSelf(type); if (element_ty.isSignlessInteger()) return DenseElementsAttr::get( type, builder.getIntegerAttr(element_ty, unique_index)); if (mlir::isa<mlir::FloatType>(element_ty)) return DenseElementsAttr::get( type, builder.getFloatAttr(element_ty, unique_index)); if (auto qtype = mlir::dyn_cast<QuantizedType>(element_ty)) {
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/lite/quantization/ir/QuantizeUtils.cc
} return nullptr; } /// Converts a real expressed DenseFPElementsAttr to a corresponding /// DenseElementsAttr (typically DenseIntElementsAttr) containing quantized /// storage values assuming the given quantizedElementType and converter. static DenseElementsAttr convertDenseFPElementsAttr( DenseFPElementsAttr realFPElementsAttr, quant::QuantizedType quantizedElementType,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0)