/external/tensorflow/tensorflow/compiler/mlir/lite/utils/ |
D | attribute_utils.cc | 22 FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr) { in ExtractSingleElementAsFloat() 28 return attr.getValue<FloatAttr>(index); in ExtractSingleElementAsFloat() 31 FloatAttr GetSingleElementAsFloatOrSelf(Attribute attr) { in GetSingleElementAsFloatOrSelf() 35 return attr.dyn_cast_or_null<FloatAttr>(); in GetSingleElementAsFloatOrSelf()
|
D | attribute_utils.h | 35 FloatAttr ExtractSingleElementAsFloat(ElementsAttr attr); 40 FloatAttr GetSingleElementAsFloatOrSelf(Attribute attr);
|
D | constant_utils.cc | 35 auto floatAttr = mlir::FloatAttr::get(floatType, static_cast<float>(value)); in CreateConstOpWithSingleValue() 40 auto floatAttr = mlir::FloatAttr::get(floatType, static_cast<float>(value)); in CreateConstOpWithSingleValue()
|
/external/llvm-project/mlir/test/Bindings/Python/ |
D | ir_attributes.py | 113 fattr = FloatAttr(Attribute.parse("42.0 : f32")) 119 print("default_get:", FloatAttr.get( 122 print("f32_get:", FloatAttr.get_f32(42.0)) 124 print("f64_get:", FloatAttr.get_f64(42.0)) 126 fattr_invalid = FloatAttr.get(
|
D | ir_array_attributes.py | 53 element = FloatAttr.get(t, 1.2) 67 element = FloatAttr.get(t, 1.2) 68 other_element = FloatAttr.get(other_t, 1.2)
|
/external/llvm-project/mlir/lib/IR/ |
D | Builders.cpp | 178 FloatAttr Builder::getF64FloatAttr(double value) { in getF64FloatAttr() 179 return FloatAttr::get(getF64Type(), APFloat(value)); in getF64FloatAttr() 182 FloatAttr Builder::getF32FloatAttr(float value) { in getF32FloatAttr() 183 return FloatAttr::get(getF32Type(), APFloat(value)); in getF32FloatAttr() 186 FloatAttr Builder::getF16FloatAttr(float value) { in getF16FloatAttr() 187 return FloatAttr::get(getF16Type(), value); in getF16FloatAttr() 190 FloatAttr Builder::getFloatAttr(Type type, double value) { in getFloatAttr() 191 return FloatAttr::get(type, value); in getFloatAttr() 194 FloatAttr Builder::getFloatAttr(Type type, const APFloat &value) { in getFloatAttr() 195 return FloatAttr::get(type, value); in getFloatAttr()
|
D | BuiltinAttributes.cpp | 210 FloatAttr FloatAttr::get(Type type, double value) { in get() 214 FloatAttr FloatAttr::getChecked(Type type, double value, Location loc) { in getChecked() 218 FloatAttr FloatAttr::get(Type type, const APFloat &value) { in get() 222 FloatAttr FloatAttr::getChecked(Type type, const APFloat &value, Location loc) { in getChecked() 226 APFloat FloatAttr::getValue() const { return getImpl()->getValue(); } in getValue() 228 double FloatAttr::getValueAsDouble() const { in getValueAsDouble() 231 double FloatAttr::getValueAsDouble(APFloat value) { in getValueAsDouble() 247 LogicalResult FloatAttr::verifyConstructionInvariants(Location loc, Type type, in verifyConstructionInvariants() 252 LogicalResult FloatAttr::verifyConstructionInvariants(Location loc, Type type, in verifyConstructionInvariants() 690 return FloatAttr::get(eltTy, *floatIt); in operator *() [all …]
|
/external/llvm-project/mlir/lib/Dialect/Quant/Utils/ |
D | QuantizeUtils.cpp | 25 if (origRealValue.isa<FloatAttr>()) { in convertPrimitiveValueAttr() 26 FloatAttr floatAttr = origRealValue.cast<FloatAttr>(); in convertPrimitiveValueAttr()
|
/external/tensorflow/tensorflow/compiler/mlir/lite/quantization/ |
D | device_target.cc | 134 auto min = rop->getAttrOfType<FloatAttr>("min"); in DecomposeMultiplyAccumulateScale() 135 auto max = rop->getAttrOfType<FloatAttr>("max"); in DecomposeMultiplyAccumulateScale() 169 auto min = rop->getAttrOfType<FloatAttr>("min"); in DecomposeSameScale() 170 auto max = rop->getAttrOfType<FloatAttr>("max"); in DecomposeSameScale()
|
D | quantization_utils.h | 117 double rmin = FloatAttr::getValueAsDouble(*it++); in matchAndRewrite() 118 double rmax = FloatAttr::getValueAsDouble(*it); in matchAndRewrite() 135 double rmin = FloatAttr::getValueAsDouble(stats.getValue<APFloat>({0})); in matchAndRewrite() 136 double rmax = FloatAttr::getValueAsDouble(stats.getValue<APFloat>({1})); in matchAndRewrite() 345 FloatAttr tolerance = rewriter.getF32FloatAttr(error_tolerance); in matchAndRewrite()
|
D | quantization_utils.cc | 139 std::fabs(FloatAttr::getValueAsDouble(f))); in RescaleQuantizedType() 166 min_value.push_back(FloatAttr::getValueAsDouble(*it)); in GetQuantizedTypeAttr() 169 max_value.push_back(FloatAttr::getValueAsDouble(*it)); in GetQuantizedTypeAttr() 172 auto fmin = min.dyn_cast<FloatAttr>(); in GetQuantizedTypeAttr() 173 auto fmax = max.dyn_cast<FloatAttr>(); in GetQuantizedTypeAttr() 278 FloatAttr::getValueAsDouble(values.getSplatValue<llvm::APFloat>()); in ExtractMinMaxFromAttr() 300 double ele_value = FloatAttr::getValueAsDouble(*it); in ExtractMinMaxFromAttr()
|
/external/llvm-project/mlir/include/mlir/IR/ |
D | Builders.h | 34 class FloatAttr; variable 94 FloatAttr getFloatAttr(Type type, double value); 95 FloatAttr getFloatAttr(Type type, const APFloat &value); 109 FloatAttr getF16FloatAttr(float value); 110 FloatAttr getF32FloatAttr(float value); 111 FloatAttr getF64FloatAttr(double value);
|
/external/llvm-project/mlir/include/mlir/Bindings/Python/ |
D | Attributes.td | 28 def : PythonAttr<"::mlir::FloatAttr", "_ir.FloatAttr">;
|
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/utils/ |
D | convert_op_folder.cc | 42 mlir::FloatAttr::getValueAsDouble(floatVal)); in ConvertElementsAttr() 56 mlir::FloatAttr::getValueAsDouble(floatVal)); in ConvertElementsAttr()
|
/external/llvm-project/mlir/lib/Dialect/Tosa/Utils/ |
D | QuantUtils.cpp | 302 min.push_back(FloatAttr::getValueAsDouble(i)); in buildQTypeFromMinMax() 304 max.push_back(FloatAttr::getValueAsDouble(i)); in buildQTypeFromMinMax() 306 auto minVal = minAttr.dyn_cast<FloatAttr>(); in buildQTypeFromMinMax() 311 auto maxVal = maxAttr.dyn_cast<FloatAttr>(); in buildQTypeFromMinMax()
|
/external/llvm-project/debuginfo-tests/llvm-prettyprinters/gdb/ |
D | mlir-support.cpp | 34 mlir::Attribute FloatAttr = mlir::FloatAttr::get(FloatType, 1.0); variable
|
D | mlir-support.gdb | 92 # CHECK: cast<mlir::FloatAttr> 93 p FloatAttr
|
/external/llvm-project/mlir/lib/Dialect/Quant/Transforms/ |
D | ConvertSimQuant.cpp | 113 min.push_back(m.cast<FloatAttr>().getValueAsDouble()); in convertFakeQuantAttrsToType() 115 max.push_back(m.cast<FloatAttr>().getValueAsDouble()); in convertFakeQuantAttrsToType()
|
D | ConvertConst.cpp | 71 if (!value.isa<FloatAttr, DenseElementsAttr, SparseElementsAttr>()) { in matchAndRewrite()
|
/external/llvm-project/mlir/test/mlir-tblgen/ |
D | op-attribute.td | 126 // DEF: if (!(((tblgen_f32_attr.isa<::mlir::FloatAttr>())) && ((tblgen_f32_attr.cast<::mlir::FloatA… 127 // DEF: if (!(((tblgen_f64_attr.isa<::mlir::FloatAttr>())) && ((tblgen_f64_attr.cast<::mlir::FloatA… 253 …lder, ::mlir::OperationState &odsState, ::mlir::FloatAttr attr, ::mlir::Value operand, ::mlir::Flo…
|
/external/llvm-project/mlir/unittests/IR/ |
D | AttributeTest.cpp | 138 Attribute value = FloatAttr::get(floatTy, 10.0); in TEST() 146 Attribute value = FloatAttr::get(floatTy, 10.0); in TEST()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | decompose_resource_ops.cc | 32 FloatAttr attr = FloatAttr::get(float_ty, raw_value); in GetScalarOfType()
|
/external/llvm-project/mlir/lib/CAPI/IR/ |
D | BuiltinAttributes.cpp | 98 return unwrap(attr).isa<FloatAttr>(); in mlirAttributeIsAFloat() 103 return wrap(FloatAttr::get(unwrap(type), value)); in mlirFloatAttrDoubleGet() 108 return wrap(FloatAttr::getChecked(unwrap(type), value, unwrap(loc))); in mlirFloatAttrDoubleGetChecked() 112 return unwrap(attr).cast<FloatAttr>().getValueAsDouble(); in mlirFloatAttrGetValueDouble()
|
/external/llvm-project/mlir/lib/Conversion/StandardToSPIRV/ |
D | ConvertStandardToSPIRV.cpp | 79 static FloatAttr convertFloatAttr(FloatAttr srcAttr, FloatType dstType, in convertFloatAttr() 83 return FloatAttr(); in convertFloatAttr() 94 return FloatAttr(); in convertFloatAttr() 630 FloatAttr dstAttr = convertFloatAttr( in matchAndRewrite() 631 srcAttr.cast<FloatAttr>(), dstElemType.cast<FloatType>(), rewriter); in matchAndRewrite() 683 auto srcAttr = constOp.value().cast<FloatAttr>(); in matchAndRewrite()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/ |
D | export_utils.cc | 102 Status ConvertAttribute(const mlir::FloatAttr& attr, AttrValue* value) { in ConvertAttribute() 189 } else if (auto attr = a.dyn_cast<mlir::FloatAttr>()) { in ConvertAttribute() 380 .Case<mlir::BoolAttr, mlir::IntegerAttr, mlir::FloatAttr, in ConvertAttributes()
|