- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 89 for IntegerAttr (0.62 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/python/mlir_wrapper/attrs.cc
#include "tensorflow/compiler/mlir/python/mlir_wrapper/mlir_wrapper.h" void init_attrs(py::module& m) { py::class_<mlir::Attribute>(m, "Attribute"); py::class_<mlir::IntegerAttr, mlir::Attribute>(m, "IntegerAttr") .def("get", py::overload_cast<mlir::Type, int64_t>(&mlir::IntegerAttr::get));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri Dec 04 15:29:40 UTC 2020 - 1.1K 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/transforms/replica_id_to_device_ordinal.cc
// attribute modulo the number of TPU cores in the system. for (auto op : require_device_ordinal_ops) { if (op->getAttrOfType<IntegerAttr>(kDeviceOrdinalAttr).getInt() == -1) { OpBuilder builder(op); int device_ordinal = op->getAttrOfType<IntegerAttr>(kReplicaIdAttr).getInt() % device_num; op->setAttr(kDeviceOrdinalAttr, builder.getI64IntegerAttr(device_ordinal)); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed Oct 05 23:50:19 UTC 2022 - 4K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf_collective.cc
public: void runOnOperation() override; }; LogicalResult SetOnceModuleAttribute(StringRef attr_name, IntegerAttr attr_value, Operation* op, ModuleOp& module) { const auto ex_attr_value = module->getAttrOfType<IntegerAttr>(attr_name); if (ex_attr_value == nullptr) { module->setAttr(attr_name, attr_value); return success(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 16K bytes - Viewed (0) -
tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_async.cc
p << "(" << op.getInCh() << ") key(" << op->getAttrOfType<mlir::IntegerAttr>("op_key").getInt() << ") device(" << op->getAttr("device") << ") " << op->getAttr("op_name") << "()"; fallback_common::PrintExecuteOpCommon(p, op); fallback_common::PrintExecuteOpFuncAttribute(p, op); p << " num_args(" << op->getAttrOfType<mlir::IntegerAttr>("num_args").getInt() << ')'; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Jun 08 01:19:25 UTC 2023 - 15.6K 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/quantization/tensorflow/utils/tf_to_xla_attribute_utils.cc
for (int i : llvm::seq<int>(1, num_dims - 1)) { Value input_size_i = GetDimValue(builder, loc, input_shape_value, i); const int stride_i = mlir::cast<IntegerAttr>(strides[i]).getInt(); const int dilation_i = mlir::cast<IntegerAttr>(dilations[i]).getInt(); const int filter_i = filter_shape.getDimSize(i - 1); Value pad_i_low, pad_i_high; GetSamePaddingValues(builder, loc, input_size_i, filter_i, dilation_i,
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 13.3K 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)