Home
last modified time | relevance | path

Searched refs:hasRank (Results 1 – 25 of 73) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/mlir/tfrt/jit/opdefs/
Dtf_jitrt_ops.cc80 assert(tensor.hasRank() && "shape must be ranked"); in GetRankedTensorSize()
81 if (!tensor.hasRank()) return 0; in GetRankedTensorSize()
92 if (type.hasRank()) in GetMaxArgSize()
/external/tensorflow/tensorflow/core/ir/types/
Ddialect.cc382 if (hasRank()) { in print()
442 if (shaped_type.hasRank()) in get()
449 if (hasRank()) return getShape(); in getValue()
453 bool ShapeAttr::hasRank() const { return !getImpl()->unranked; } in hasRank() function in mlir::tf_type::ShapeAttr
456 assert(hasRank()); in getRank()
461 if (!hasRank()) return false; in hasStaticShape()
475 if (shaped_type.hasRank()) return shaped_type.getShape(); in GetShape()
786 if (!a_tt.hasRank() && !b_tt.hasRank()) { in GetCastCompatibleType()
789 if (!a_tt.hasRank()) { in GetCastCompatibleType()
792 if (!b_tt.hasRank()) { in GetCastCompatibleType()
/external/tensorflow/tensorflow/compiler/mlir/quantization/tensorflow/passes/
Dreplace_cast_hacks_with_tf_xla_ops.cc169 if (!input_shape.hasRank() || input_shape.getRank() != 4 || in CreateXLAConvOpFromTFConv2DOp()
170 !filter_shape.hasRank() || filter_shape.getRank() != 4) { in CreateXLAConvOpFromTFConv2DOp()
189 if (!input_shape.hasRank() || input_shape.getRank() != 4 || in CreateXLAConvOpFromTFDepthwiseConv2DOp()
190 !filter_shape.hasRank() || filter_shape.getRank() != 4) { in CreateXLAConvOpFromTFDepthwiseConv2DOp()
Dprepare_lifting.td70 CPred<"$0.getType().cast<ShapedType>().hasRank() && "
81 "$0.getType().cast<ShapedType>().hasRank() && "
82 "$1.getType().cast<ShapedType>().hasRank() && "
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_utils.h164 inferredKnowledge.hasRank = predictedShape.hasRank(); in CreateOpAndInfer()
165 if (predictedShape.hasRank()) { in CreateOpAndInfer()
Dlegalize_utils.cc362 if (!input_type.hasRank() || !filter_type.getRank()) return false; in getPaddingValuesFromPadType()
434 if (!input_type.hasRank() || !filter_type.hasRank() || !output_type.hasRank()) in getTransposeConv2dPaddingValues()
/external/tensorflow/tensorflow/compiler/mlir/tfrt/analysis/
Dcost_analysis.cc45 if (type.hasRank()) return GetRankedTensorSize(type); in InferTensorSize()
148 if (type.hasRank()) { in AnalyzeArguments()
190 if (type.hasRank()) { in EvaluateCost()
/external/tensorflow/tensorflow/core/ir/utils/
Dshape_inference_utils_test.cc86 EXPECT_EQ(shape.hasRank(), info[i].hasRank()); in VerifyInferredShapes()
87 if (shape.hasRank()) EXPECT_EQ(shape.getShape(), info[i].getDims()); in VerifyInferredShapes()
/external/tensorflow/tensorflow/compiler/mlir/lite/utils/
Dtftext_utils.cc72 return type && type.hasRank() && type.getRank() == rank; in RankEquals()
92 !input_type.hasRank()) { in VerifyWhitespaceTokenizer()
169 if (input_values.hasRank() && output_values.hasRank() && in VerifyNgrams()
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/transforms/
Dlegalize_gather_to_torch_index_select.cc37 if (!startIndicesTy.hasRank()) { in matchAndRewrite()
43 if (!operandTy.hasRank()) { in matchAndRewrite()
Doptimize_mhlo.cc60 if (!gather.operand().getType().cast<ShapedType>().hasRank() || in matchAndRewrite()
62 !gather.start_indices().getType().cast<ShapedType>().hasRank() || in matchAndRewrite()
Dlegalize_shape_computations.cc61 if (!shapedTy.hasRank() || shapedTy.getRank() > 1) return false; in opIsShapeComputation()
173 if (!shapedTy.hasRank() || shapedTy.getRank() > 1) return failure(); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dshape_inference.cc109 if (lhs_shape_type.hasRank() && rhs_shape_type.hasRank() && in TypeMeet()
121 if (!lhs_shape_type.hasRank()) { in TypeMeet()
122 if (rhs_shape_type.hasRank()) { in TypeMeet()
127 } else if (rhs_shape_type.hasRank()) { in TypeMeet()
190 if (!lhs_shape_type.hasRank() && !rhs_shape_type.hasRank()) in TypeMeet()
406 if (shape.hasRank()) in GetType()
497 if (!type.hasRank() || type.getRank() != 1) return failure(); in ComputeInputsRequiredForOutput()
540 if (!type.hasRank() || type.getRank() != 1) return nullptr; in ComputeOutputComponent()
1492 if (operand_shape.hasRank() && source_shape.hasRank() && in InferShapeForXlaSelectAndScatterOp()
1979 if (!current_type.hasRank()) return true; in CanWhileTypeBeRefinedWith()
[all …]
Doptimize.cc69 if (!input_type.hasRank() || !output_type.hasRank()) return failure(); in matchAndRewrite()
Dlayout_optimization.cc228 return result_type && operand_type && result_type.hasRank() && in MoveTransposeBefore()
229 operand_type.hasRank() && in MoveTransposeBefore()
280 if (!type.hasRank()) return type; in ReversePermuteShapedType()
/external/tensorflow/tensorflow/core/transforms/constant_folding/
Dpass.cc871 if (!input_shape.hasRank()) return failure(); in matchAndRewrite()
1006 if (!type.hasRank()) return false; in matchAndRewrite()
1113 if (!indices_shape.hasRank()) return failure(); in matchAndRewrite()
1121 if (!input_shape.hasRank() || input_shape.getRank() < 1) return failure(); in matchAndRewrite()
1125 output_shape.hasRank() ? output_shape.getRank() : -1; in matchAndRewrite()
1432 if (!x_shape.hasRank()) return failure(); in matchAndRewrite()
1464 if (!x_shape.hasRank()) return failure(); in matchAndRewrite()
1491 if (!shape.hasRank()) return failure(); in matchAndRewrite()
1511 if (!tensor_type.hasRank()) return failure(); in matchAndRewrite()
1563 if (!input_type.hasRank()) return failure(); in matchAndRewrite()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.cc167 if (!shaped_type || !shaped_type.hasRank()) { in VerifyOperandsHaveSameShapesOrBroadcastableShape()
970 if (params_type.hasRank() && params_type.getRank() != 1) { in verify()
1023 if (filter_type.hasRank() && filter_type.getRank() != 2) { in verify()
1218 if ((input_ty && input_ty.hasRank() && input_ty.getRank() != 4) || in inferReturnTypes()
1219 (filter_ty && filter_ty.hasRank() && filter_ty.getRank() != 4)) { in inferReturnTypes()
1225 if (!input_ty || !filter_ty || !input_ty.hasRank() || !filter_ty.hasRank()) { in inferReturnTypes()
1331 if (!params_type.hasRank() || !indices_type.hasRank()) in BuildGatherOp()
1449 if (output_type.hasRank()) { in verify()
1575 if (input_type.hasRank()) { in verify()
2188 if (!val_type.hasRank()) in BuildTopKOp()
[all …]
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/stablehlo/dialect/
DStablehloOps.cpp525 if (allInputsUnranked || !blockArgTensorTy.hasRank()) return success(); in verifyReducerShape()
605 if (!operandType.hasRank() || !resultType.hasRank()) continue; in verifyReduceScatter()
876 if (!tensorType.hasRank()) continue; in verify()
983 if (!lhs.hasRank() || !rhs.hasRank()) { in inferDotReturnType()
1031 if (resultType.hasRank() && expectReturnType.hasRank()) { in verify()
1360 (operandShape.hasRank() && startIndexMap[i] >= operandShape.getRank())) in verifyGather()
1366 if (startIndicesShape.hasRank()) { in verifyGather()
1415 if (operandShape.hasRank() && operandShape.getRank() != impliedOperandRank) in verifyGather()
1426 if (sliceSizesShape.hasRank() && sliceSizesShape.getRank() != 1) in verifyGather()
1476 if (operandShape.hasRank()) { in verifyStaticGather()
[all …]
/external/tensorflow/tensorflow/core/ir/importexport/
Dconvert_tensor.h60 if (shape.hasRank()) { in SetTensorShapeProto()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/utils/
Dexport_utils.h72 if (shape.hasRank()) { in SetTensorShapeProto()
/external/tensorflow/tensorflow/compiler/xla/mlir_hlo/lib/Dialect/mhlo/IR/
Dhlo_ops_common.cc69 if (!operandType.hasRank() || !resultType.hasRank()) continue; in verifyReduceScatter()
/external/tensorflow/tensorflow/compiler/xla/mlir/utils/runtime/
Dconstraints.cc76 if (constraint == ArgumentConstraint::kRank && shaped.hasRank()) in ResolveArgumentConstraint()
/external/tensorflow/tensorflow/core/transforms/shape_inference/
Dpass.cc110 if (!operand_shape.hasRank()) return; in TryToCacheResultsTensorValue()
207 if (result.hasRank()) { in runOnOperation()
/external/tensorflow/tensorflow/dtensor/mlir/
Dshape_utils.cc145 if (shaped_type.hasRank()) { in InferShapeOfTFOpWithCustomOperandConstantFn()
221 if (return_type.hasRank()) { in InferSPMDExpandedLocalShape()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Dlegalize_tf.cc641 if (!lhs.getType().cast<ShapedType>().hasRank() || in rewriteOpWithDynamicInput()
642 !rhs.getType().cast<ShapedType>().hasRank()) { in rewriteOpWithDynamicInput()
760 if (!lhs.getType().cast<ShapedType>().hasRank() || in rewriteOpWithDynamicInput()
761 !rhs.getType().cast<ShapedType>().hasRank() || in rewriteOpWithDynamicInput()
762 !cond.getType().cast<ShapedType>().hasRank()) { in rewriteOpWithDynamicInput()

123