- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 14 for TypedAttr (0.11 sec)
-
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/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/quantization/ir/ConvertConst.cc
auto fusedLoc = rewriter.getFusedLoc( {qbarrier.getArg().getDefiningOp()->getLoc(), qbarrier.getLoc()}); auto newConstOp = rewriter.create<arith::ConstantOp>( fusedLoc, newConstValueType, cast<TypedAttr>(newConstValue)); rewriter.replaceOpWithNewOp<StorageCastOp>(qbarrier, qbarrier.getType(), newConstOp); return success(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 4.4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfr/ir/tfr_ops.cc
ArrayAttr array; 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();
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/utils/utils.h
values.begin(), values.end(), [](const APInt& element_value) { return element_value.isNegative(); }); } // Utility function to get the offset between two dense attribute values. inline TypedAttr GetOffSet(Attribute begin, Attribute end) { auto begin_values = begin.cast<DenseElementsAttr>().getValues<int32_t>(); auto end_values = end.cast<DenseElementsAttr>().getValues<int32_t>(); SmallVector<int32_t> offsets;
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/c/c_api_unified_experimental_mlir.cc
return InvalidArgument("Missing attribute '", output_arg.type_attr(), "' required for output '", output_arg.name(), "'"); TypedAttr type_attr = mlir::dyn_cast<TypedAttr>(attr); if (!type_attr) return InvalidArgument("Attribute '", output_arg.type_attr(), "' required for output '", output_arg.name(),
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/passes/decompose.cc
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/transforms/optimize.cc
return f.isExactlyValue(value); }); } // Returns true if `value` is compile-time constant and its splat value equals // to `raw_value`. template <typename T> bool IsConstantValueOf(mlir::TypedAttr value, T raw_value) { auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType(); if (mlir::isa<FloatType>(element_type)) { return FloatValueEquals(value, raw_value);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Apr 30 00:40:15 UTC 2024 - 102.3K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/flatbuffer_import.cc
tensor.sparsity->block_map, dim_metadata); std::vector<char> dense_buffer( value_type.getElementType().getIntOrFloatBitWidth() / CHAR_BIT); mlir::TypedAttr dummy_value = mlir::DenseIntOrFPElementsAttr::getFromRawBuffer(value_type, dense_buffer); if (tfl::IsQuantized(tensor)) { return builder
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 21 18:21:50 UTC 2024 - 66.8K bytes - Viewed (0)