Home
last modified time | relevance | path

Searched refs:input_ty (Results 1 – 11 of 11) sorted by relevance

/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/
Dlower_tf.cc375 auto input_ty = input.getType().cast<ShapedType>(); in matchAndRewrite() local
376 auto element_ty = input_ty.getElementType(); in matchAndRewrite()
437 op.getLoc(), input_ty, input, nudged_float_min, nudged_float_max); in matchAndRewrite()
439 quantized_input = rewriter.create<SubOp>(op.getLoc(), input_ty, in matchAndRewrite()
442 quantized_input = rewriter.create<MulOp>(op.getLoc(), input_ty, in matchAndRewrite()
450 quantized_input = rewriter.create<AddV2Op>(op.getLoc(), input_ty, in matchAndRewrite()
456 Value output = rewriter.create<MulOp>(op.getLoc(), input_ty, in matchAndRewrite()
459 output = rewriter.create<AddV2Op>(op.getLoc(), input_ty, output, in matchAndRewrite()
791 Type input_ty = input.getType(); in matchAndRewrite() local
792 if (input_ty != prev_input_ty) { in matchAndRewrite()
[all …]
Dshape_inference.cc1425 auto input_ty = op.input().getType().cast<ShapedType>(); in InferShapeForXlaReduceWindowOp() local
1428 if (input_ty.hasStaticShape() && in InferShapeForXlaReduceWindowOp()
1471 input_ty, window.getValue(), in InferShapeForXlaReduceWindowOp()
2702 if (auto input_ty = func_type.getInput(i).dyn_cast<RankedTensorType>()) { in InferShapeForFunction() local
2703 if (input_ty.getRank() != shape.size()) { in InferShapeForFunction()
2706 element_type = input_ty.getElementType(); in InferShapeForFunction()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_tensor_helper.cc64 Type input_ty = input.getType(); in InferReductionOpType() local
65 Type element_ty = getElementTypeOrSelf(input_ty); in InferReductionOpType()
68 auto ranked_ty = input_ty.dyn_cast<RankedTensorType>(); in InferReductionOpType()
Dtf_ops_n_z.cc343 auto input_ty = pack_op.getOperand(0).getType().cast<ShapedType>(); in matchAndRewrite() local
345 if (!input_ty.hasStaticShape() || !output_ty.hasStaticShape()) { in matchAndRewrite()
1063 static Attribute ConvertShapeToAttr(Type input_ty, int out_width) { in ConvertShapeToAttr() argument
1064 auto ranked_ty = input_ty.dyn_cast<RankedTensorType>(); in ConvertShapeToAttr()
1076 {rank}, IntegerType::get(input_ty.getContext(), out_width)); in ConvertShapeToAttr()
1261 auto input_ty = op.input().getType().dyn_cast<RankedTensorType>(); in verify() local
1262 if (input_ty && begin_ty.getNumElements() != input_ty.getRank()) { in verify()
1268 if (output_ty && input_ty && output_ty.getRank() != input_ty.getRank()) { in verify()
1272 << input_ty.getRank() << " and output rank " << output_ty.getRank(); in verify()
1285 int64_t input_size = input_ty ? input_ty.getShape()[dim] : -1; in verify()
[all …]
Dtf_ops_a_m.cc1379 auto input_ty = op.x().getType().template dyn_cast<RankedTensorType>(); in Verify() local
1380 if (input_ty) { in Verify()
1381 int64_t rank = input_ty.getRank(); in Verify()
1733 const TensorType input_ty = input.getType().template cast<TensorType>(); in inferConvReturnTypeComponents() local
1760 if (input_ty.hasRank()) { in inferConvReturnTypeComponents()
1762 input_ty.getDimSize(GetTensorBatchDimIndex(num_dims, format)); in inferConvReturnTypeComponents()
1771 if (input_ty.hasRank() && filter_ty.hasRank()) { in inferConvReturnTypeComponents()
1785 if (input_ty.isDynamicDim(dim) || filter_ty.isDynamicDim(i)) continue; in inferConvReturnTypeComponents()
1788 input_ty.getDimSize(dim), filter_ty.getDimSize(i), in inferConvReturnTypeComponents()
1797 inferredReturnShapes.emplace_back(return_shape, input_ty.getElementType()); in inferConvReturnTypeComponents()
[all …]
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/
Dlegalize_tf.cc78 RankedTensorType input_ty) { in GetFeatureDimension() argument
79 return GetTensorFeatureDimIndex(input_ty.getRank(), format); in GetFeatureDimension()
870 auto input_ty = input.getType().dyn_cast<RankedTensorType>(); in CanBeTranslatedToDynamicSlice() local
871 if (!input_ty) return false; in CanBeTranslatedToDynamicSlice()
875 int64_t input_rank = input_ty.getRank(); in CanBeTranslatedToDynamicSlice()
876 ArrayRef<int64_t> input_shape = input_ty.getShape(); in CanBeTranslatedToDynamicSlice()
904 auto input_ty = input.getType().dyn_cast<RankedTensorType>(); in TFSliceSizes2HLOSliceSizes() local
905 int64_t input_rank = input_ty.getRank(); in TFSliceSizes2HLOSliceSizes()
906 ArrayRef<int64_t> input_shape = input_ty.getShape(); in TFSliceSizes2HLOSliceSizes()
1128 auto input_ty = op.input().getType().template dyn_cast<RankedTensorType>(); in matchAndRewriteDynamicConv() local
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/transforms/
Doptimize.cc243 auto input_ty = input.getType().cast<ShapedType>(); in CanOptimizeIdentitySliceOp() local
244 if (!input_ty.hasRank()) { in CanOptimizeIdentitySliceOp()
248 int64_t rank = input_ty.getRank(); in CanOptimizeIdentitySliceOp()
259 if (si != -1 && si != input_ty.getDimSize(i)) return false; in CanOptimizeIdentitySliceOp()
1364 auto input_ty = input.getType().dyn_cast<ShapedType>(); in matchAndRewrite() local
1368 if (!input_ty.hasStaticShape() || in matchAndRewrite()
1381 if (!reshape_input_ty.hasStaticShape() || input_ty.getRank() == 0 || in matchAndRewrite()
1383 input_ty.getDimSize(input_ty.getRank() - 1) != in matchAndRewrite()
1552 auto input_ty = value.getType().dyn_cast_or_null<ShapedType>(); in ComputeSliceK() local
1554 if (!input_ty || !result_ty) return llvm::None; in ComputeSliceK()
[all …]
/external/tensorflow/tensorflow/compiler/xla/service/gpu/
Dgpu_layout_assignment.cc78 PrimitiveType input_ty = instr->operand(0)->shape().element_type(); in HeuristicLayoutAssignment() local
79 if (primitive_util::IsIntegralType(input_ty)) { in HeuristicLayoutAssignment()
80 if (input_ty == S8 && dnums.input_spatial_dimensions_size() == 2 && in HeuristicLayoutAssignment()
104 if (input_ty != F16 || in HeuristicLayoutAssignment()
Dcudnn_vectorize_convolutions.cc63 PrimitiveType input_ty = instr->operand(0)->shape().element_type(); in GetRelevantConvs() local
65 if (input_ty == output_ty && (input_ty == S8 || input_ty == U8)) { in GetRelevantConvs()
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.cc1212 const RankedTensorType input_ty = in inferReturnTypes() local
1218 if ((input_ty && input_ty.hasRank() && input_ty.getRank() != 4) || in inferReturnTypes()
1225 if (!input_ty || !filter_ty || !input_ty.hasRank() || !filter_ty.hasRank()) { in inferReturnTypes()
1250 return_shape[0] = input_ty.getDimSize(0); in inferReturnTypes()
1257 if (!input_ty.isDynamicDim(1) && !filter_ty.isDynamicDim(1)) { in inferReturnTypes()
1260 input_ty.getDimSize(1), filter_ty.getDimSize(1), dilation_h, in inferReturnTypes()
1268 if (!input_ty.isDynamicDim(2) && !filter_ty.isDynamicDim(2)) { in inferReturnTypes()
1271 input_ty.getDimSize(2), filter_ty.getDimSize(2), dilation_w, in inferReturnTypes()
1279 mlir::RankedTensorType::get(return_shape, input_ty.getElementType()); in inferReturnTypes()
1758 auto input_ty = input.getType().cast<TensorType>(); in GetReshapeOutputType() local
[all …]
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/
Dlegalize_tfl.cc1981 auto input_ty = input.getType().cast<ShapedType>(); in matchAndRewrite() local
1984 if (!input_ty.hasRank()) return failure(); in matchAndRewrite()
1986 if (input_ty.getElementType().isF32()) { in matchAndRewrite()
1988 auto result_ty = UnrankedTensorType::get(input_ty.getElementType()); in matchAndRewrite()
1993 rewriter.getI64IntegerAttr(input_ty.getRank() - 1)); in matchAndRewrite()
2500 RankedTensorType input_ty = input.getType().dyn_cast<RankedTensorType>(); in matchAndRewrite() local
2504 Type input_ety = input_ty.getElementType(); in matchAndRewrite()
2507 if (!input_ty || !output_ty) return failure(); in matchAndRewrite()
2514 bool input_is_fp = input_ty.getElementType().isF32(); in matchAndRewrite()
2535 rewriter, loc, input_ty, input, fp_scale, rewriter.getI32IntegerAttr(0)); in matchAndRewrite()
[all …]