- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for IntegerAttr (0.18 sec)
-
tensorflow/compiler/mlir/lite/utils/validators.cc
bool TFIntListIs1XYZ1(Operation *op, StringRef name, IntegerAttr *x, IntegerAttr *y, IntegerAttr *z) { auto attr = op->getAttrOfType<ArrayAttr>(name); if (!attr) return false; auto elements = attr.getValue(); if (elements.size() != 5 || std::any_of(elements.begin(), elements.end(), [](Attribute e) { return !mlir::isa<IntegerAttr>(e); })) return false;
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/validators.h
// and writes X, Y as 32-bit integer attribute to `x`, `y`, z. bool TFIntListIs1XYZ1(Operation *op, StringRef name, IntegerAttr *x, IntegerAttr *y, IntegerAttr *z); // Returns true if every element of the attribute is 1. All elements of `attr` // must be `IntegerAttr`. bool TFIntListIsAllOnes(Attribute attr); // Returns true iff the given value is a float32 tensor. // is "DT_FLOAT".
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/tensorflow/utils/translate_utils.cc
if (!version_attr) return mlir::failure(); auto producer = mlir::dyn_cast_or_null<mlir::IntegerAttr>(version_attr.get("producer")); if (!producer) return mlir::failure(); versions->set_producer(producer.getInt()); auto min_consumer = mlir::dyn_cast_or_null<mlir::IntegerAttr>( version_attr.get("min_consumer")); if (min_consumer) versions->set_min_consumer(min_consumer.getInt());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Apr 26 09:37:10 UTC 2024 - 3.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/attribute_utils.cc
} else { return mlir::dyn_cast_or_null<FloatAttr>(attr); } } IntegerAttr ExtractSingleElementAsInteger(ElementsAttr attr) { if (attr.getShapedType().getNumElements() != 1 || !attr.getShapedType().getElementType().isSignlessInteger()) { return {}; } return attr.getSplatValue<IntegerAttr>(); } } // namespace TFL
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 1.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_composite_to_tfl_custom.cc
NamedAttribute pair) { const char* key = pair.getName().data(); const auto attr = pair.getValue(); if (mlir::isa<::mlir::IntegerAttr>(attr)) { fbb->Int(key, mlir::dyn_cast<mlir::IntegerAttr>(attr).getInt()); return success(); } if (mlir::isa<::mlir::FloatAttr>(attr)) { fbb->Double(key, mlir::dyn_cast<mlir::FloatAttr>(attr).getValueAsDouble());
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
FloatAttr attr = FloatAttr::get(float_ty, raw_value); return DenseElementsAttr::get(scalar_ty, attr); } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) { IntegerAttr attr = IntegerAttr::get(int_ty, raw_value); return DenseElementsAttr::get(scalar_ty, attr); } else if (auto complex_ty = mlir::dyn_cast<ComplexType>(ty)) { Type complex_element_ty = complex_ty.getElementType();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 22 19:47:48 UTC 2024 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/perception_ops_utils.cc
<< "'" << attr_name << "' attribute for " << kMaxUnpooling << " must be set and has size of " << N; } for (Attribute integer_attr : array_attr.getValue()) { IntegerAttr value = mlir::dyn_cast<IntegerAttr>(integer_attr); if (!value) { return func->emitWarning() << "'" << attr_name << "' attribute for " << kMaxUnpooling << " does not contain integer values"; } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 8.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_common.cc
mlir::Type tensor_type, const ParseExecuteOpOptions &options) { auto chain_type = builder.getType<compiler::ChainType>(); mlir::IntegerAttr op_key; mlir::IntegerAttr cost; mlir::StringAttr device; mlir::StringAttr op_name; mlir::SymbolRefAttr f; llvm::SmallVector<mlir::OpAsmParser::UnresolvedOperand, 4> in_chains;
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/tensorflow/transforms/tpu_partitioned_op_conversion.cc
: public impl::TPUPartitionedOpConversionPassBase< TPUPartitionedOpConversionPass> { void runOnOperation() override; }; template <typename T> LogicalResult ReplacePartitionedOp(IntegerAttr num_cores_per_replica, T op) { constexpr bool is_input = std::is_same_v<std::decay_t<T>, TF::TPUPartitionedInputOp>; static_assert( is_input || std::is_same_v<std::decay_t<T>, TF::TPUPartitionedOutputOp>,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/ir/QuantizeUtils.cc
using namespace mlir; using namespace mlir::quantfork; /// Converts a possible primitive, real expressed value attribute to a /// corresponding storage attribute (typically FloatAttr -> IntegerAttr). /// quantizedElementType is the QuantizedType that describes the expressed /// origValue. /// Returns a converter Attribute or nullptr if conversion is not possible. static Attribute convertPrimitiveValueAttr(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.1K bytes - Viewed (0)