- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 58 for ShapedType (0.17 sec)
-
tensorflow/compiler/mlir/quantization/tensorflow/passes/prepare_quantize_drq.cc
bool getQuantizableOps(arith::ConstantOp op, QuantizationUnits& quantizable_ops) const { // Non-float tensors do not need quantization. auto type = mlir::dyn_cast<ShapedType>(op.getType()); if (!type || !type.getElementType().isF32()) return false; Value value = op.getResult(); // Check whether dynamic range quantization can be applied.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_weights.cc
if (!hasUsageFromQuantizableOp(op)) return failure(); // Check if the weight size is big enough. int num_elements_threshold = quant_options_.min_num_elements_for_weights(); int num_elements = cast<ShapedType>(op.getType()).getNumElements(); if (num_elements < num_elements_threshold) { op->emitRemark("Quantization is skipped because the op has ") << num_elements << " elements which is fewer than the threshold("
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 05 07:39:40 UTC 2024 - 11.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_patterns.td
ConstantAttr<MHLO_FftTypeAttr, "::mlir::mhlo::FftType::" # enumStr>; def GetInnerDimFromValue : NativeCodeCall< "GetInnerDimFromValue($0.getType().cast<ShapedType>(), &$_builder)">; def CheckInnerDimStatic : Constraint<CPred<"CheckInnerDimStatic($0.getType().cast<ShapedType>(), &$_builder)">>; def : Pat<(TF_FFTOp:$res $input), (MHLO_FftOp $input, MHLO_FftTypeValue<"FFT">, (GetInnerDimFromValue $res)),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon May 06 18:46:23 UTC 2024 - 34.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/prepare_tpu_computation_for_tf_export.cc
shape_attrs.reserve(op.getNumResults()); for (Type ty : op.getResultTypes()) { shape_attrs.push_back(TF::ShapeAttr::get(rewriter.getContext(), mlir::cast<ShapedType>(ty))); } // Clone the `host_func` in the `host_mlir_module` attribute if it exists // and use it for `shape_inference_graph` attribute on XlaHostCompute. func::FuncOp cloned_func;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_operator.h
static inline std::vector<T> GetVector( vhlo::TensorV1Attr elements, mlir::vhlo::VhloTypeConverter &vhlo_type_converter) { return GetOptionalVector<T>(mlir::DenseIntElementsAttr::getFromRawBuffer( mlir::cast<mlir::ShapedType>( vhlo_type_converter.convertType(elements.getType())), elements.getData())); } } // namespace mlir
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/tensorflow/transforms/tpu_dynamic_layout_pass.cc
OpBuilder* builder) { return builder->create<TF::TPUGetLayoutOp>( compile_launch.getLoc(), llvm::ArrayRef<Type>{RankedTensorType::get({ShapedType::kDynamic}, builder->getIntegerType(64))}, llvm::ArrayRef<Value>{compilation_key}, llvm::ArrayRef<NamedAttribute>{ builder->getNamedAttr("index",
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc
llvm::SmallVector<Attribute, 2> shape_attrs; llvm::SmallVector<Attribute, 2> type_attrs; for (Type type : dataset_types) { shape_attrs.push_back( TF::ShapeAttr::get(builder.getContext(), mlir::cast<ShapedType>(type))); type_attrs.push_back(TypeAttr::get(getElementTypeOrSelf(type))); } auto anonymous_iterator = builder.create<AnonymousIteratorV3Op>( reduce_dataset.getLoc(),
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h
LogicalResult matchAndRewrite(quantfork::StatisticsOp op, PatternRewriter& rewriter) const override { Type expressed = op.getType().cast<ShapedType>().getElementType(); quant::QuantizedType quant_type; SmallVector<double, 4> mins, maxs; if (op.getAxisStats().has_value()) { // Per axis quantization (or per channel quantization)
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Apr 24 20:30:06 UTC 2024 - 41.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 07 11:51:44 UTC 2024 - 14.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_types.cc
// If input is not TF qint types, returns the original type. Type ToLegalType(Type type) { if (IsTFQintType(type)) return GetIntTypeFromTFQint(type); if (auto shaped = mlir::dyn_cast<ShapedType>(type)) { Type elem = shaped.getElementType(); if (IsTFQintType(elem)) return shaped.clone(ToLegalType(elem)); } return type; } bool IsQintToIntCast(Operation *op) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 12.6K bytes - Viewed (0)