- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 66 for type_attr (0.2 sec)
-
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/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) -
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/utils/lstm_utils.cc
/*asymmetric_quantize_inputs=*/mlir::BoolAttr(), /*input_to_input_intermediate=*/mlir::TypeAttr(), /*input_to_forget_intermediate=*/mlir::TypeAttr(), /*input_to_cell_intermediate=*/mlir::TypeAttr(), /*input_to_output_intermediate=*/mlir::TypeAttr(), /*effective_hidden_scale_intermediate=*/mlir::TypeAttr()); // Cast the static shaped lstm result to FuncOp's signature -
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 36.2K 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) -
tensorflow/compiler/mlir/tensorflow/utils/convert_attr.cc
case AttrValue::kB: return builder->getBoolAttr(value.b()); case AttrValue::kType: { mlir::Type type; TF_RETURN_IF_ERROR(ConvertDataType(value.type(), *builder, &type)); return mlir::TypeAttr::get(type); } case AttrValue::kShape: return ConvertTensorShapeProto(value.shape(), builder->getContext()); case AttrValue::kTensor: return ConvertTensorProto(value.tensor(), builder);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 4.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h
// before the op being constant folded. Since the constant // folding logic will use a "arith.constant" op to replace the // "tf.FakeQuantWithMinMaxVarsOp", the "quant.qcast" op is used to preserve // the quantization parameters as a TypeAttr and "quant.dcast" op used to // convert the output type to the next op. Here are the transformations: // // input min cst max cst input // \ | | |
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.3K bytes - Viewed (0)