Home
last modified time | relevance | path

Searched refs:lhs_type (Results 1 – 22 of 22) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/utils/
Dbroadcast_utils.cc33 RankedTensorType lhs_type = lhs.getType().dyn_cast<RankedTensorType>(); in IsLegalNumpyRankedBroadcast() local
35 if (!lhs_type || !rhs_type) return false; in IsLegalNumpyRankedBroadcast()
36 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()
54 auto lhs_type = lhs.getType().dyn_cast<RankedTensorType>(); in ComputeBinaryElementwiseBroadcastingResultExtents() local
56 if (!lhs_type || !rhs_type) { in ComputeBinaryElementwiseBroadcastingResultExtents()
66 int64_t result_rank = std::max(lhs_type.getRank(), rhs_type.getRank()); in ComputeBinaryElementwiseBroadcastingResultExtents()
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/transforms/
Dlhlo_legalize_to_affine.cc50 MemRefType lhs_type = lhs.getType().cast<MemRefType>(); in matchAndRewrite() local
52 Type element_type = lhs_type.getElementType(); in matchAndRewrite()
53 ArrayRef<int64_t> shape_lhs = lhs_type.getShape(); in matchAndRewrite()
56 if ((lhs_type.getRank() != 2) || (rhs_type.getRank() != 2)) { in matchAndRewrite()
109 const auto& lhs_type = lhs.getType().template cast<MemRefType>(); in matchAndRewrite() local
111 const auto& element_type = lhs_type.getElementType(); in matchAndRewrite()
113 if (lhs_type.getShape() != rhs_type.getShape()) { in matchAndRewrite()
129 BuildBoundedAffineLoopNest(rewriter, op.getLoc(), lhs_type.getShape(), in matchAndRewrite()
Dlegalize_to_standard.cc42 auto lhs_type = lhs.getType().cast<TensorType>(); in matchAndRewrite() local
46 if (lhs_type.getShape() != rhs_type.getShape()) return failure(); in matchAndRewrite()
48 if (!lhs_type.getElementType().isSignlessInteger() || in matchAndRewrite()
79 auto lhs_type = lhs.getType().cast<TensorType>(); in matchAndRewrite() local
83 if (lhs_type.getShape() != rhs_type.getShape()) return failure(); in matchAndRewrite()
85 if (!lhs_type.getElementType().isa<FloatType>() || in matchAndRewrite()
Dchlo_legalize_to_hlo.cc1007 auto lhs_type = in matchAndRewrite() local
1011 if (!lhs_type || !rhs_type) return failure(); in matchAndRewrite()
1014 if (lhs_type.getRank() != rhs_type.getRank()) return failure(); in matchAndRewrite()
1017 if (!lhs_type.hasStaticShape() || !rhs_type.hasStaticShape()) in matchAndRewrite()
1020 for (auto extents : llvm::zip(lhs_type.getShape(), rhs_type.getShape())) { in matchAndRewrite()
1058 auto lhs_type = lhs.getType().dyn_cast<RankedTensorType>(); in matchAndRewrite() local
1062 if (!lhs_type || !rhs_type || !result_type) return failure(); in matchAndRewrite()
1095 int64_t result_rank = std::max(lhs_type.getRank(), rhs_type.getRank()); in matchAndRewrite()
1106 llvm::seq<int64_t>(result_rank - lhs_type.getRank(), result_rank)); in matchAndRewrite()
1110 lhs_type.getElementType()), in matchAndRewrite()
Dtransform_unranked_hlo.cc225 auto lhs_type = lhs.getType().dyn_cast<UnrankedTensorType>(); in matchAndRewrite() local
231 if (!lhs_type || !rhs_type) return failure(); in matchAndRewrite()
243 loc, RankedTensorType::get({}, lhs_type.getElementType()), lhs); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/xla/service/
Doperand_upcaster_test.cc39 PrimitiveType lhs_type, rhs_type, result_type; in TEST_P() local
40 std::tie(lhs_type, rhs_type, result_type) = GetParam(); in TEST_P()
51 module_tmpl, primitive_util::LowercasePrimitiveTypeName(lhs_type), in TEST_P()
57 EXPECT_EQ(upcasted, ShouldUpcast(lhs_type, result_type) || in TEST_P()
62 ShouldUpcast(lhs_type, result_type) in TEST_P()
Dshape_inference_test.cc621 ConvolveArgs MakeConvolveArgs(PrimitiveType lhs_type, PrimitiveType rhs_type) { in MakeConvolveArgs() argument
626 args.lhs_shape = ShapeUtil::MakeShape(lhs_type, {10, 11, 3, 4}); in MakeConvolveArgs()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dbatchmatmul_to_einsum.cc56 auto lhs_type = input_lhs.getType().dyn_cast<RankedTensorType>(); in matchAndRewrite() local
59 if (!lhs_type || !rhs_type) return failure(); in matchAndRewrite()
61 auto lhs_shape = lhs_type.getShape(); in matchAndRewrite()
Dunroll_batch_matmul.cc204 auto lhs_type = input_lhs.getType().cast<RankedTensorType>(); in matchAndRewrite() local
207 auto element_type = lhs_type.getElementType(); in matchAndRewrite()
214 auto lhs_shape = lhs_type.getShape(); in matchAndRewrite()
231 lhs_type = input_lhs.getType().cast<RankedTensorType>(); in matchAndRewrite()
232 lhs_shape = lhs_type.getShape(); in matchAndRewrite()
Deinsum.cc241 RankedTensorType lhs_type = lhs->getType().cast<RankedTensorType>(); in reshapeForBatchMatmul() local
249 int64_t b = lhs_type.getShape()[std::get<0>(i)]; in reshapeForBatchMatmul()
261 int64_t b = lhs_type.getShape()[std::get<0>(i)]; in reshapeForBatchMatmul()
268 lhs_out_size *= lhs_type.getShape()[std::get<0>(i)]; in reshapeForBatchMatmul()
276 lhs_rhs_size *= lhs_type.getShape()[std::get<0>(i)]; in reshapeForBatchMatmul()
292 *lhs = createReshapeOp(*lhs, lhs_shape, lhs_type.getElementType(), loc, in reshapeForBatchMatmul()
Dlegalize_hlo.cc452 auto lhs_type = lhs.getType().cast<ShapedType>(); in ConvertDot() local
454 const int lhs_rank = lhs_type.getRank(); in ConvertDot()
459 lhs_type, dot_dimension_numbers.lhs_batching_dimensions(), in ConvertDot()
477 RankedTensorType::get(lhs_transposed_shape, lhs_type.getElementType()), in ConvertDot()
510 RankedTensorType::get(lhs_flattened_shape, lhs_type.getElementType()), in ConvertDot()
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/
Dchlo_ops.cc136 ShapedType lhs_type = operands[0].getType().dyn_cast<ShapedType>(); in InferBroadcastBinaryOpReturnTypeComponents() local
138 if (!lhs_type || !rhs_type || in InferBroadcastBinaryOpReturnTypeComponents()
139 lhs_type.getElementType() != rhs_type.getElementType()) { in InferBroadcastBinaryOpReturnTypeComponents()
142 if (!element_type) element_type = lhs_type.getElementType(); in InferBroadcastBinaryOpReturnTypeComponents()
144 GetBroadcastType(lhs_type, rhs_type, element_type, broadcast_dimensions); in InferBroadcastBinaryOpReturnTypeComponents()
198 ShapedType lhs_type = operands[0].getType().dyn_cast<ShapedType>(); in inferReturnTypeComponents() local
199 if (!lhs_type) { in inferReturnTypeComponents()
202 Type element_type = ComplexType::get(lhs_type.getElementType()); in inferReturnTypeComponents()
/external/deqp-deps/SPIRV-Tools/source/fuzz/
Dfuzzer_pass_add_equation_instructions.cpp219 auto lhs_type = in Apply() local
223 if (lhs_type->AsVector()) { in Apply()
224 lhs_element_count = lhs_type->AsVector()->element_count(); in Apply()
225 lhs_bit_width = lhs_type->AsVector() in Apply()
231 lhs_bit_width = lhs_type->AsInteger()->width(); in Apply()
/external/swiftshader/third_party/SPIRV-Tools/source/fuzz/
Dfuzzer_pass_add_equation_instructions.cpp219 auto lhs_type = in Apply() local
223 if (lhs_type->AsVector()) { in Apply()
224 lhs_element_count = lhs_type->AsVector()->element_count(); in Apply()
225 lhs_bit_width = lhs_type->AsVector() in Apply()
231 lhs_bit_width = lhs_type->AsInteger()->width(); in Apply()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_types.cc207 auto lhs_type = DropRefType(std::get<0>(types)); in BroadcastCompatible() local
211 auto lhs_tt = lhs_type.dyn_cast<TensorType>(); in BroadcastCompatible()
214 if (lhs_type != rhs_type) return false; in BroadcastCompatible()
241 auto lhs_rt = lhs_type.dyn_cast<RankedTensorType>(); in BroadcastCompatible()
Dtf_ops_helpers.inc456 auto lhs_type = arithmetic_op.x().getType().template cast<ShapedType>();
494 Type element_ty = lhs_type.getElementType();
505 if (rhs_attr && is_valid_broadcasting(lhs_type, rhs_type, result_type)) {
512 is_valid_broadcasting(rhs_type, lhs_type, result_type)) {
Dtf_ops_a_m.cc1260 auto lhs_type = RankedTensorType::get(lhs_dims, ranked.getElementType()); in GetHoistParams() local
1265 lhs_type, in GetHoistParams()
/external/arm-trusted-firmware/plat/common/
Dubsan.c39 struct type_descriptor *lhs_type; member
/external/tensorflow/tensorflow/compiler/xla/service/cpu/
Dtiled_dot_emitter.cc970 llvm::Type* lhs_type = lhs->getType(); in GetGemvBuffersWithCanonicalType() local
976 b->CreateBitCast(lhs, GetPointerToElementType(lhs_type)); in GetGemvBuffersWithCanonicalType()
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_common.cc591 RankedTensorType lhs_type = lhs_val.getType().cast<RankedTensorType>(); in convertConcatV2Op() local
593 ArrayRef<int64_t> lhs_tensor_shape = lhs_type.getShape(); in convertConcatV2Op()
638 lhs_type.getElementType() in convertConcatV2Op()
667 RankedTensorType::get(lhs_type.getShape(), result_quant_type); in convertConcatV2Op()
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc2782 auto lhs_type = lhs.getType().cast<RankedTensorType>(); in BroadcastBatchMatMulV2Operands() local
2787 OpTrait::util::getBroadcastedShape(lhs_type.getShape().drop_back(2), in BroadcastBatchMatMulV2Operands()
2813 broadcast_one_side(lhs, lhs_type, lhs_splitted.tail(), out_lhs); in BroadcastBatchMatMulV2Operands()
2834 auto lhs_type = lhs.getType().dyn_cast<RankedTensorType>(); in matchAndRewrite() local
2836 if (!lhs_type || !rhs_type) return failure(); in matchAndRewrite()
2837 if (lhs_type.getElementType().isa<ComplexType>() && op.adj_x()) { in matchAndRewrite()
2838 lhs = rewriter.create<TF::ConjOp>(op.getLoc(), lhs_type, lhs); in matchAndRewrite()
2847 lhs_type = lhs.getType().cast<RankedTensorType>(); in matchAndRewrite()
2849 assert(lhs_type.getRank() == rhs_type.getRank()); in matchAndRewrite()
2850 int64_t rank = lhs_type.getRank(); in matchAndRewrite()
/external/libabigail/src/
Dabg-ir.cc12432 maybe_propagate_canonical_type(const type_base& lhs_type,
20099 types_are_being_compared(const type_base& lhs_type, in types_are_being_compared() argument
20102 type_base *l = &const_cast<type_base&>(lhs_type); in types_are_being_compared()
20152 maybe_propagate_canonical_type(const type_base& lhs_type, in maybe_propagate_canonical_type() argument
20156 if (const environment *env = lhs_type.get_environment()) in maybe_propagate_canonical_type()
20158 if (type_base_sptr canonical_type = lhs_type.get_canonical_type()) in maybe_propagate_canonical_type()
20160 && !types_are_being_compared(lhs_type, rhs_type)) in maybe_propagate_canonical_type()