- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 113 for ShapedType (0.16 sec)
-
tensorflow/compiler/mlir/lite/experimental/tac/common/utils.h
// or if 'op' is null. bool NotTFLQuantDequantizeOp(Operation* op); // Returns true if it is a shaped type of f32 elements. inline bool IsF32ShapedType(Type t) { if (auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(t)) { return shaped_type.getElementType().isF32(); } return false; } // Return true when the given element_type is QI8. inline bool IsQI8Type(Type t) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 3.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.cc
std::back_inserter(real_values), [&](APFloat value) -> float { return value.convertToFloat(); }); const ShapedType new_dense_type = dyn_cast_or_null<ShapedType>( q_type.castExpressedToStorageType(real_values_attr.getType())); const int width = dyn_cast<IntegerType>(q_type.getStorageType()).getWidth();
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Wed May 08 02:10:16 UTC 2024 - 43.2K bytes - Viewed (0) -
tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc
// Slice each row of `i` and `v` to perform a separate dynamic-update-slice // on the contents of `x`. auto input_type = mlir::cast<ShapedType>(input.getType()); auto updates_type = mlir::cast<ShapedType>(updates.getType()); auto indices_type = mlir::cast<ShapedType>(indices.getType()); if (!input_type.hasRank()) return failure(); if (!updates_type.hasRank() || updates_type.isDynamicDim(0))
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Jun 11 20:00:43 UTC 2024 - 291.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h
} // Returns true if `value` is compile-time constant and its splat value equals // to `raw_value`. template <typename T> bool IsConstantValueOf(Value value, T raw_value) { auto element_type = mlir::cast<ShapedType>(value.getType()).getElementType(); if (mlir::isa<FloatType>(element_type)) { DenseFPElementsAttr float_attr; if (matchPattern(value, m_Constant(&float_attr)) && float_attr.isSplat() &&
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/tensorflow/transforms/unroll_batch_matmul.cc
} // Input dimensions must be defined. MatMulBCast does not support partial // shapes. for (auto dim : lhs_shape) { if (dim == mlir::ShapedType::kDynamic) { return failure(); } } for (auto dim : rhs_shape) { if (dim == mlir::ShapedType::kDynamic) { return failure(); } } // Ensure that batch shapes are broadcastable. tensorflow::MatMulBCast bcast(
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 11.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.h
bool HasStaticShapeAtDims(Value value, ArrayRef<int> dims); // Whether `value` has known rank of `rank`. Returns false when it is not a // `ShapedType` or its rank is unknown. inline bool HasRankOf(Value value, const int64_t rank) { auto shaped_type = mlir::dyn_cast_or_null<ShapedType>(value.getType()); return shaped_type && shaped_type.hasRank() && shaped_type.getRank() == rank; }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 9.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc
Type TypeMeet(Type lhs, Type rhs) { DCOMMENT("RefineTypeWith : " << lhs << " : " << rhs); if (lhs == rhs) return lhs; auto rhs_shape_type = mlir::dyn_cast<ShapedType>(rhs); if (!rhs_shape_type) return lhs; auto lhs_shape_type = mlir::cast<ShapedType>(lhs); if (lhs_shape_type.hasRank() && rhs_shape_type.hasRank() && lhs_shape_type.getRank() != rhs_shape_type.getRank()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sat Jun 08 07:28:49 UTC 2024 - 134.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/quantization/quantization_context.cc
quant::AdjacentOperations *new_items, bool *changed) { // Use the final state to set all the operands' parameters. for (int i = 0, e = op->getNumOperands(); i != e; ++i) { auto ele = op->getOperand(i).getType().cast<ShapedType>().getElementType(); if (ele.isa<FloatType>() && SetOperandParams(op, i, params)) { *changed |= true; new_items->push_back(op->getOperand(i).getDefiningOp()); } }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Apr 08 01:38:03 UTC 2024 - 13.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/convert_control_to_data_outputs.cc
return true; } // Appends function arguments with `num_resources` number of arguments of // requested type. void AppendFunctionArguments(func::FuncOp func, int num_resources, ShapedType chaining_data_type) { for (int i = 0; i < num_resources; ++i) { func.getRegion().addArgument(chaining_data_type, func.getLoc()); } FunctionType ftype =
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 28.7K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/transforms/tpu_annotate_dynamic_shape_inputs.cc
auto shape = llvm::to_vector<4>(inputType.getShape()); llvm::SmallVector<int64_t, 4> bounds(shape.begin(), shape.end()); // Mark the dim as dynamic dim. shape[0] = ShapedType::kDynamic; auto extensions = mhlo::TypeExtensionsAttr::get(func->getContext(), bounds); auto resultType = RankedTensorType::get(shape, inputType.getElementType(), extensions);
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0)