- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 54 for ShapedType (0.28 sec)
-
tensorflow/compiler/mlir/lite/stablehlo/transforms/optimize.cc
// Convert mhlo.dot to mhlo.dot_general. LogicalResult ConvertDotToDotGeneral(mhlo::DotOp op, PatternRewriter &rewriter) { auto lhs_type = mlir::cast<ShapedType>(op.getLhs().getType()); auto rhs_type = mlir::cast<ShapedType>(op.getRhs().getType()); if (!lhs_type.hasRank() || !rhs_type.hasRank()) { return rewriter.notifyMatchFailure(op, "unsupported unranked input type"); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 26.9K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc
.isExactlyValue(0.0f)); EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1); auto output_types = fused_lstm_func_.getFunctionType().getResults(); SmallVector<int64_t, 2> output_shape{1, mlir::ShapedType::kDynamic}; EXPECT_EQ(mlir::cast<RankedTensorType>(output_types[0]).getShape().size(), output_shape.size()); for (int i = 0; i < output_shape.size(); i++) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 10K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/transforms/post_quantize.cc
return failure(); } // Remove identity reshape with both static result and input shape. auto result_type = mlir::cast<ShapedType>(op.getType()); auto input_type = mlir::cast<ShapedType>(op.getInput().getType()); // Constant folding // If the result type isn't static, tries to derive the result type from // the #2 operand.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 17.1K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_ops_to_mhlo.cc
const xla::ConvolutionDimensionNumbers &dnums, PatternRewriter &rewriter) { StringAttr conv_padding = op.getPaddingAttr(); SmallVector<int64_t> padding_nums; ShapedType lhs_shape = mlir::cast<ShapedType>(op.getLhs().getType()); ShapedType rhs_shape = mlir::cast<ShapedType>(op.getRhs().getType()); // Handle only static shape cases. // TODO(b/260284866): Handle dynamic shape cases. if (!lhs_shape.hasStaticShape()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Fri May 17 17:58:54 UTC 2024 - 30.9K 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/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/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/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)