- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 57 for qtype_attr (0.11 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/tensorflow/c/c_api_unified_experimental_mlir.cc
"'"); TypeAttr type_attr = mlir::dyn_cast<TypeAttr>(attr); if (!type_attr) return InvalidArgument("Attribute '", output_arg.type_attr(), "' required for output '", output_arg.name(), "' isn't a type attribute"); state_->types.push_back(UnrankedTensorType::get(type_attr.getValue())); } else if (!output_arg.type_list_attr().empty()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
if (matchPattern(cst_tensor_op.getArg(), m_Constant(&array))) { llvm::DenseSet<Type> all_types; for (auto it : array) { TypedAttr typed_attr = it.dyn_cast<TypedAttr>(); if (!typed_attr) return failure(); all_types.insert(typed_attr.getType()); } if (all_types.size() != 1) return failure(); ShapedType new_out_type = RankedTensorType::get(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Nov 21 16:55:41 UTC 2023 - 38.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/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>(
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/lite/flatbuffer_import.cc
for (auto type_and_name : llvm::zip(intermediate_types, kIntermediateNames)) { mlir::TypeAttr type_attr = mlir::TypeAttr::get(std::get<0>(type_and_name)); auto named_attr = builder.getNamedAttr(std::get<1>(type_and_name), type_attr); op_state.addAttribute(named_attr.getName(), named_attr.getValue()); } } return absl::OkStatus(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/passes/decompose.cc
} attribute = TypeAttr::get(type); } Value attr_cst; // Wrap these special attributes as a special TFR constant, so the SSA // value has a valid type to be used as TFR function argument. These // attributes are not expected to be manipulated by the lowering passes. if (mlir::isa<TypeAttr>(attribute) || mlir::isa<ArrayAttr>(attribute) ||
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 14.6K 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)