- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for qtype_attr (0.23 sec)
-
tensorflow/compiler/mlir/lite/utils/convert_type.h
// Returns element type from attribute Type 'type_attr'. mlir::Type GetShapeStrippedType(mlir::TypeAttr type_attr); // Returns true if 'val' is not from Quantize op or // from Quantize Op with same quant type as 'qtype_attr' bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr); } // namespace tflite
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 2.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/convert_type.cc
} } mlir::Type GetShapeStrippedType(mlir::TypeAttr type_attr) { auto type = type_attr.getValue(); auto shaped_type = mlir::dyn_cast<mlir::ShapedType>(type); if (shaped_type) { return shaped_type.getElementType(); } else { return type; } } bool NotFromQuantOpOrSameQuantType(mlir::Value val, mlir::TypeAttr qtype_attr) { auto val_defn_op = val.getDefiningOp();
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/lite/transforms/modify_io_nodes.cc
dequantize_input.getType(), dequantize_op.getLoc()); // replace the dequantize op by a quantize op TypeAttr type_attr = TypeAttr::get(returned_type); auto quantize_op = builder.create<QuantizeOp>( dequantize_op.getLoc(), returned_type, dequantize_input, type_attr); returned_value = quantize_op.getOutput(); } else { output_type.print(llvm::errs() << "Requested output type ");
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/default_quant_params.cc
builder.setInsertionPoint(&block, ++Block::iterator(op)); } else { builder.setInsertionPointToStart(&block); } TypeAttr type_attr = TypeAttr::get(new_type); auto quantize = builder.create<TFL::QuantizeOp>(value.getLoc(), new_type, value, type_attr); auto dequantize = builder.create<TFL::DequantizeOp>( value.getLoc(), expressed_type, quantize.getOutput());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/constant_utils.cc
#include "tensorflow/core/framework/tensor_shape.pb.h" #include "tensorflow/core/platform/status.h" #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());
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/validators.h
} /// Returns whether the given `a` and `b` have broadcast-compatible /// types. bool IsBroadcastableElementsAttrs(mlir::TypedAttr a, mlir::TypedAttr b); // Returns true if every dimension of the attribute is 1 except the last one. bool IsDimensionsDegenerateExceptLastOne(mlir::TypedAttr val); // Returns true if every element is 1 except the last one. bool IsDimensionsDegenerateExceptLastOne(ArrayRef<int64_t> elements_shape);
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/validators.cc
return !std::any_of(elements.begin(), elements.end(), [](Attribute e) { return mlir::cast<IntegerAttr>(e).getValue() != 1; }); } bool IsBroadcastableElementsAttrs(mlir::TypedAttr a, mlir::TypedAttr b) { // This would return false if we had unranked tensors (where they should // probably be considered as broadcastable), but given we are working with // attributes here that shouldn't be an issue,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/device_target.cc
if (!rop) return failure(); llvm::SmallVector<Type, 4> input_specs, out_specs; for (auto spec : rop.getInputSpecs()) { input_specs.push_back(spec.cast<TypeAttr>().getValue()); } for (auto spec : rop.getOutputSpecs()) { out_specs.push_back(spec.cast<TypeAttr>().getValue()); } auto in_spec = input_specs[0].dyn_cast<UniformQuantizedType>(); // TODO(fengliuai): handles the PerAxis QuantizedType.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Mar 08 10:41:08 UTC 2024 - 7.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc
return srcScastOp.getArg(); } /// The quantization specification should match the expressed type. static bool isValidQuantizationSpec(Attribute quantSpec, Type expressed) { if (auto typeAttr = mlir::dyn_cast<TypeAttr>(quantSpec)) { Type spec = typeAttr.getValue(); if (mlir::isa<TensorType, VectorType>(spec)) return false; // The spec should be either a quantized type which is compatible to the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantOps.cc
return srcScastOp.getArg(); } /// The quantization specification should match the expressed type. static bool isValidQuantizationSpec(Attribute quantSpec, Type expressed) { if (auto typeAttr = mlir::dyn_cast<TypeAttr>(quantSpec)) { Type spec = typeAttr.getValue(); if (mlir::isa<TensorType, VectorType>(spec)) return false; // The spec should be either a quantized type which is compatible to the
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.3K bytes - Viewed (0)