- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 123 for ShapedType (0.14 sec)
-
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) -
tensorflow/compiler/mlir/lite/transforms/prepare_quantize_helper.h
auto next_op = *transpose_op.getResult().getUsers().begin(); if (dyn_cast_or_null<quantfork::QuantizeCastOp>(next_op)) return failure(); auto input_type = mlir::cast<ShapedType>(transpose_op.getInput().getType()); auto perm_type = mlir::cast<ShapedType>(transpose_op.getPerm().getType()); if (input_type.hasStaticShape() && perm_type.hasStaticShape()) { if (perm_type.getNumElements() != input_type.getRank()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 03 18:01:23 UTC 2024 - 28K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/legalize_jax_random.cc
auto result_tuple_ty = mlir::dyn_cast_or_null<TupleType>(func.getFunctionType().getResult(0)); if (!result_tuple_ty) return; if (result_tuple_ty.size() != 1) return; auto result_ty = mlir::dyn_cast<ShapedType>(result_tuple_ty.getType(0)); func.eraseBody(); func.addEntryBlock(); ImplicitLocOpBuilder builder(func.getLoc(), func.getBody()); llvm::SmallVector<int32_t> result_shape_i32;
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/quantization/tensorflow/passes/propagate_quantize_type.cc
auto original_result_type = user_op->getResult(0).getType(); auto new_user_op_type = CloneTypeWithNewElementType( original_result_type, mlir::cast<ShapedType>(op_before_dequantize.getType()) .getElementType()); createNewDequantizeOp(rewriter, op, user_op, user_idx, new_user_op_type); } else {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 7K bytes - Viewed (0)