Home
last modified time | relevance | path

Searched refs:getRank (Results 1 – 25 of 174) sorted by relevance

1234567

/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/utils/
Dbroadcast_utils.cc36 if (lhs_type.getRank() == rhs_type.getRank()) return true; in IsLegalNumpyRankedBroadcast()
39 auto smaller_rank = std::min(lhs_type.getRank(), rhs_type.getRank()); in IsLegalNumpyRankedBroadcast()
40 auto larger_rank = std::max(lhs_type.getRank(), rhs_type.getRank()); in IsLegalNumpyRankedBroadcast()
66 int64_t result_rank = std::max(lhs_type.getRank(), rhs_type.getRank()); in ComputeBinaryElementwiseBroadcastingResultExtents()
/external/angle/src/compiler/translator/
DQualifierTypes.h43 virtual unsigned int getRank() const = 0;
58 unsigned int getRank() const override;
69 unsigned int getRank() const override;
86 unsigned int getRank() const override;
103 unsigned int getRank() const override;
123 unsigned int getRank() const override;
143 unsigned int getRank() const override;
163 unsigned int getRank() const override;
DQualifierTypes.cpp335 return q1->getRank() < q2->getRank(); in operator ()()
856 unsigned int TInvariantQualifierWrapper::getRank() const in getRank() function in sh::TInvariantQualifierWrapper
861 unsigned int TPreciseQualifierWrapper::getRank() const in getRank() function in sh::TPreciseQualifierWrapper
866 unsigned int TInterpolationQualifierWrapper::getRank() const in getRank() function in sh::TInterpolationQualifierWrapper
871 unsigned int TLayoutQualifierWrapper::getRank() const in getRank() function in sh::TLayoutQualifierWrapper
876 unsigned int TStorageQualifierWrapper::getRank() const in getRank() function in sh::TStorageQualifierWrapper
890 unsigned int TMemoryQualifierWrapper::getRank() const in getRank() function in sh::TMemoryQualifierWrapper
895 unsigned int TPrecisionQualifierWrapper::getRank() const in getRank() function in sh::TPrecisionQualifierWrapper
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Doptimize_mhlo.cc75 dimension_numbers.start_index_map().getType().getRank() != 1 || in matchAndRewrite()
91 result_ty.getRank()) { in matchAndRewrite()
102 gather.operand().getType().cast<ShapedType>().getRank()) { in matchAndRewrite()
127 if (gather_start_indices_ty.getRank() == 0) { in matchAndRewrite()
129 } else if (gather_start_indices_ty.getRank() == 1) { in matchAndRewrite()
149 if (sliceSizesTy.getRank() != 1) { in matchAndRewrite()
Dlegalize_to_linalg.cc120 if (!type || type.getRank() != 0) return {}; in GetInitValueAsConst()
155 unsigned nloops = t0.getRank(); in matchAndRewrite()
157 return !t || !t.hasRank() || t.getRank() != nloops || in matchAndRewrite()
240 (arg_type.getRank() != 0)) { in matchAndRewrite()
380 auto nloops = result_type.getRank(); in matchAndRewrite()
416 unsigned input_rank = input_type.getRank(); in getIndexingMaps()
417 unsigned nloops = GetHloOpResultType<isLHLO>(broadcast_op).getRank(); in getIndexingMaps()
454 unsigned nloops = result_type.getRank(); in getIndexingMaps()
457 if (operand_type.getRank() == 0) { in getIndexingMaps()
498 if (!operand_type || operand_type.getRank() != 0) return failure(); in matchAndRewrite()
[all …]
Dlegalize_gather_to_torch_index_select.cc46 std::max<int64_t>(0, start_indices_ty.getRank() - 1); in matchAndRewrite()
63 if (dimension_numbers.start_index_map().getType().getRank() != 1 || in matchAndRewrite()
78 result_ty.getRank() - index_vector_dim) { in matchAndRewrite()
Dmaterialize_broadcasts.cc51 assert(max_type.getRank() == 0); in matchAndRewrite()
59 assert(min_type.getRank() == 0); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_n_z.cc135 if (depth_attr.getType().getRank() != 0) in Verify()
195 inputs_rank = ty.getRank(); in Verify()
261 if (!value_ty.hasRank() || value_ty.getRank() != expected_rank) return None; in fold()
294 if (arg_ty.getRank() != values().size()) return {}; in fold()
541 int32_t rank = ranked_type.getRank(); in fold()
586 if (shape_ty.getRank() != 1) in GetReshapeOutputType()
588 "requires 'shape' to be rank 1, but got {0}", shape_ty.getRank())); in GetReshapeOutputType()
762 data_rank = then_tensor.getRank(); in Verify()
763 if (then_tensor.getRank() > 0) in Verify()
765 if (else_tensor.getRank() > 0) in Verify()
[all …]
/external/llvm-project/mlir/lib/Dialect/Vector/
DVectorOps.cpp127 int64_t rank = op.getVectorType().getRank(); in verify()
277 if (dimPair.first < 0 || dimPair.first >= lhsType.getRank() || in verifyDimMap()
278 dimPair.second < 0 || dimPair.second >= rhsType.getRank() || in verifyDimMap()
302 for (int64_t i = 0, e = lhsType.getRank(); i < e; ++i) { in verifyOutputShape()
309 for (int64_t i = 0, e = rhsType.getRank(); i < e; ++i) { in verifyOutputShape()
338 for (unsigned idx = 0, e = v.getRank(); idx < e; ++idx) { in verifyOutputShape()
553 if (vectorType.getRank() != 1) in verify()
564 if (static_cast<int64_t>(position.size()) == vectorType.getRank()) in inferExtractOpResultType()
613 static_cast<int64_t>(positionAttr.size()) > vectorType.getRank()) in parseExtractOp()
628 if (positionAttr.size() > static_cast<unsigned>(op.getVectorType().getRank())) in verify()
[all …]
DVectorTransforms.cpp91 int64_t rank = tp.getRank(); in adjustType()
197 assert(static_cast<int64_t>(sizes.size()) == vectorType.getRank()); in generateExtractSlicesOpResultType()
198 assert(static_cast<int64_t>(strides.size()) == vectorType.getRank()); in generateExtractSlicesOpResultType()
239 state.unrolledShape.resize(vectorType.getRank()); in initUnrolledVectorState()
539 unsigned vectorRank = vectorType.getRank(); in generateTransferOpSlices()
541 assert(vectorRank >= memrefVectorElementType.getRank()); in generateTransferOpSlices()
542 vectorRank -= memrefVectorElementType.getRank(); in generateTransferOpSlices()
831 SmallVector<int64_t, 4> offsets(consumerVectorType.getRank(), 0); in getProducerValue()
912 unsigned sourceVectorRank = sourceVectorType.getRank(); in getProducerValue()
915 unsigned resultVectorRank = resultVectorType.getRank(); in getProducerValue()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.cc79 max_rank = std::max(max_rank, shaped_type.getRank()); in VerifyOperandsHaveSameShapesOrBroadcastableShape()
413 std::vector<int64_t> current_index(type.getRank(), 0); in ConstFoldBinaryOpDenseDense()
416 GetPaddedShape(lhs.getType().getShape(), type.getRank()); in ConstFoldBinaryOpDenseDense()
418 GetPaddedShape(rhs.getType().getShape(), type.getRank()); in ConstFoldBinaryOpDenseDense()
577 if (axis < 0) axis += output_type.getRank(); in GetConcatenationOpAxis()
597 const int64_t output_rank = output_type.getRank(); in VerifyConcatenationOpTypes()
618 const int64_t operand_rank = operand_type.getRank(); in VerifyConcatenationOpTypes()
675 if (axis < 0 || axis >= output_type.getRank()) in Verify()
794 if (filter_type.hasRank() && filter_type.getRank() != 2) { in Verify()
977 int64_t params_rank = params_type.getRank(); in BuildGatherOp()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/
Dhlo_ops.cc96 rank = ty.getRank(); in VerifyDimAttr()
98 rank = ty.getRank(); in VerifyDimAttr()
208 if (dnums.index_vector_dim().getInt() != 0 || index.getType().getRank() > 1) in matchAndRewrite()
292 if (shape.getRank() == 0) in Verify()
296 if (iota_dimension >= shape.getRank() || iota_dimension < 0) in Verify()
310 if (!result_ty.hasRank() || result_ty.getRank() < 2) { in matchAndRewrite()
376 if (!result_ty.hasRank() || result_ty.getRank() < 2) { in matchAndRewrite()
484 if (type.getRank() != 2) in Verify()
487 << type.getRank(); in Verify()
700 auto sizesRank = sizesType.getRank(); in Verify()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/utils/
Dtftext_utils.cc74 return type && type.hasRank() && type.getRank() == rank; in RankEquals()
99 if (input_type.getRank() >= kValidNumOfOutput.size()) { in VerifyWhitespaceTokenizer()
101 << "Unrecognized input rank: " << input_type.getRank(); in VerifyWhitespaceTokenizer()
103 if (func.getNumResults() != kValidNumOfOutput[input_type.getRank()]) { in VerifyWhitespaceTokenizer()
105 << "Expect " << kValidNumOfOutput[input_type.getRank()] in VerifyWhitespaceTokenizer()
106 << "output(s) when input has rank " << input_type.getRank(); in VerifyWhitespaceTokenizer()
171 input_values.getRank() != output_values.getRank()) { in VerifyNgrams()
Dattribute_utils.cc27 SmallVector<uint64_t, 8> index(attr.getType().getRank(), 0); in ExtractSingleElementAsFloat()
44 SmallVector<uint64_t, 8> index(attr.getType().getRank(), 0); in ExtractSingleElementAsInteger()
/external/llvm-project/mlir/examples/toy/Ch3/mlir/
DDialect.cpp140 if (attrType.getRank() != resultType.getRank()) { in verify()
144 << attrType.getRank() << " != " << resultType.getRank(); in verify()
148 for (int dim = 0, dimE = attrType.getRank(); dim < dimE; ++dim) { in verify()
/external/llvm-project/mlir/examples/toy/Ch2/mlir/
DDialect.cpp140 if (attrType.getRank() != resultType.getRank()) { in verify()
144 << attrType.getRank() << " != " << resultType.getRank(); in verify()
148 for (int dim = 0, dimE = attrType.getRank(); dim < dimE; ++dim) { in verify()
/external/llvm-project/mlir/include/mlir/Dialect/StandardOps/IR/
DOps.h164 return getSrcMemRef().getType().cast<MemRefType>().getRank(); in getSrcMemRefRank()
176 return getDstMemRef().getType().cast<MemRefType>().getRank(); in getDstMemRefRank()
203 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank()
293 return getTagMemRef().getType().cast<MemRefType>().getRank(); in getTagMemRefRank()
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Doptimize.cc67 if (sq_op.getType().cast<ShapedType>().getRank() - 1 == in L2NormalizeReduceAxis()
72 if (sq_op.getType().cast<ShapedType>().getRank() != axis.getNumElements()) { in L2NormalizeReduceAxis()
78 for (int i = 0; i < shape.getRank(); ++i) { in L2NormalizeReduceAxis()
113 !full_type.hasRank() || tail_type.getRank() > full_type.getRank()) in IsTailOfShape()
186 if (!params_type || !indices_type || indices_type.getRank() != 2 || in CanOptimizeIdentityGatherNdOrScatterNdOp()
274 if (shape_attr.getNumElements() != type.getRank()) return false; in ShapeMatchesReduceWithKeepAxes()
282 for (uint64_t i = 0; i < type.getRank(); ++i) { in ShapeMatchesReduceWithKeepAxes()
332 if (constant_val_type.getRank() == 0) { in matchAndRewrite()
334 } else if (constant_val_type.getRank() != 1) { in matchAndRewrite()
357 if (filter_type == nullptr || filter_type.getRank() != 2) { in matchAndRewrite()
[all …]
/external/llvm-project/mlir/examples/toy/Ch6/mlir/
DDialect.cpp196 if (attrType.getRank() != resultType.getRank()) { in verify()
200 << attrType.getRank() << " != " << resultType.getRank(); in verify()
204 for (int dim = 0, dimE = attrType.getRank(); dim < dimE; ++dim) { in verify()
/external/llvm-project/mlir/examples/toy/Ch5/mlir/
DDialect.cpp196 if (attrType.getRank() != resultType.getRank()) { in verify()
200 << attrType.getRank() << " != " << resultType.getRank(); in verify()
204 for (int dim = 0, dimE = attrType.getRank(); dim < dimE; ++dim) { in verify()
/external/llvm-project/mlir/examples/toy/Ch4/mlir/
DDialect.cpp196 if (attrType.getRank() != resultType.getRank()) { in verify()
200 << attrType.getRank() << " != " << resultType.getRank(); in verify()
204 for (int dim = 0, dimE = attrType.getRank(); dim < dimE; ++dim) { in verify()
/external/llvm-project/mlir/lib/Dialect/Linalg/Transforms/
DDropUnitDims.cpp257 int64_t origRank = type.getRank(); in replaceUnitExtents()
430 srcType.getRank() < dstType.getRank() || in matchAndRewrite()
431 parentSrcType.getRank() == dstType.getRank()) in matchAndRewrite()
440 bool isFoldingPattern = parentSrcType.getRank() > dstType.getRank(); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlegalize_hlo.cc215 .getRank() != 1) in IsSupportedConvOp()
397 const int rank = type.getRank(); in DotDimensionsInfo()
454 const int lhs_rank = lhs_type.getRank(); in ConvertDot()
455 const int rhs_rank = rhs_type.getRank(); in ConvertDot()
544 auto lhs_rank = dot_op.lhs().getType().cast<ShapedType>().getRank(); in ConvertDotOp()
742 if (type.getRank() > 1) { in matchAndRewrite()
743 std::vector<int64_t> reshape_shape(type.getRank(), 1); in matchAndRewrite()
785 rw_type.getRank() <= 3 || rw_type.getRank() > 5) in matchAndRewrite()
975 if (index_vector_dim == indices_type.getRank()) { in NormalizeIndexVector()
983 } else if (index_vector_dim != indices_type.getRank() - 1) { in NormalizeIndexVector()
[all …]
/external/llvm-project/mlir/lib/Dialect/Linalg/IR/
DLinalgOps.cpp65 for (unsigned i = 0, e = t.getRank(); i < e; ++i) in createFlatListOfOperandDims()
476 unsigned rank = op.getShapedType(t).getRank(); in verify()
535 if (m.getNumResults() != view.getRank()) in verifyGenericOp()
618 return largerType.getRank() > intermediateType.getRank() && in matchAndRewrite()
619 intermediateType.getRank() > smallerType.getRank(); in matchAndRewrite()
867 unsigned expandedRank = expandedType.getRank(); in verifyReshapeLikeTypes()
868 unsigned collapsedRank = collapsedType.getRank(); in verifyReshapeLikeTypes()
1033 unsigned rank = memRefType.getRank(); in build()
1087 if (op.getRank() != rank) in verify()
1088 return op.emitOpError() << "expected rank of the view(" << op.getRank() in verify()
[all …]
/external/llvm-project/mlir/lib/Conversion/VectorToLLVM/
DConvertVectorToLLVM.cpp25 assert((tp.getRank() > 1) && "unlowerable vector type"); in reducedVectorTypeFront()
31 assert((tp.getRank() > 1) && "unlowerable vector type"); in reducedVectorTypeBack()
56 if (vectorType.getRank() > 1) in insertOne()
83 if (vectorType.getRank() > 1) in extractOne()
637 int64_t rank = dstType.getRank(); in matchAndRewrite()
675 int64_t rank = vectorType.getRank(); in matchAndRewrite()
676 assert(v1Type.getRank() == rank); in matchAndRewrite()
677 assert(v2Type.getRank() == rank); in matchAndRewrite()
816 if (vType.getRank() != 1) in matchAndRewrite()
944 if (vType.getRank() < 2) in matchAndRewrite()
[all …]

1234567