/external/tensorflow/tensorflow/core/kernels/ |
D | sparse_concat_op.cc | 77 const int input_rank = input_shape.dims(); in Compute() local 79 ? input_rank + concat_dim_attr_ in Compute() 81 OP_REQUIRES(context, concat_dim >= 0 && concat_dim < input_rank, in Compute() 83 -input_rank, ", ", input_rank, in Compute() 88 context, current_shape.dims() == input_rank, in Compute() 90 "Ranks of all input tensors must match: expected ", input_rank, in Compute() 92 for (int j = 0; j < input_rank; ++j) { in Compute() 112 gtl::InlinedVector<int64, 8> std_order(input_rank); in Compute() 116 concat_order.reserve(input_rank); in Compute() 118 for (int j = 0; j < input_rank; ++j) { in Compute()
|
D | sparse_split_op.cc | 51 const int64 input_rank = input_shape.vec<int64>().size(); in Compute() local 52 const int64 axis = (axis_input < 0) ? input_rank + axis_input : axis_input; in Compute() 55 context, axis >= 0 && axis < input_rank, in Compute() 56 errors::InvalidArgument("Input axis should be in range [", -input_rank, in Compute() 57 ", ", input_rank, "), got ", axis_input)); in Compute()
|
D | reshape_util.cc | 44 const int64 input_rank = input_shape.dims(); in operator ()() local 47 gtl::InlinedVector<int64, 8> input_strides(input_rank); in operator ()() 48 if (input_rank > 0) { in operator ()() 49 input_strides[input_rank - 1] = 1; in operator ()() 50 for (int d = input_rank - 2; d >= 0; --d) { in operator ()() 66 for (int j = 0; j < input_rank; ++j) { in operator ()()
|
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/ |
D | matrix_diag_ops.cc | 125 const int input_rank = input_shape.dims(); in SetMatrixDiag() local 127 padding_config = xla::MakeNoPaddingConfig(input_rank - 1); in SetMatrixDiag() 158 std::vector<int64> broadcast_dimensions(input_rank - 1); in SetMatrixDiag() 191 broadcast_dimensions.back() = input_rank - 1; // Column-wise. in SetMatrixDiag() 193 broadcast_dimensions.back() = input_rank - 2; // Row-wise. in SetMatrixDiag() 199 broadcast_dimensions.back() = input_rank - 2; // Row-wise. in SetMatrixDiag() 202 broadcast_dimensions.back() = input_rank - 1; // Column-wise. in SetMatrixDiag() 210 padding_config.mutable_dimensions(input_rank - 2) in SetMatrixDiag() 212 padding_config.mutable_dimensions(input_rank - 2) in SetMatrixDiag() 358 const int input_rank = input_shape.dims(); in Compile() local [all …]
|
D | depthtospace_op.cc | 62 int input_rank = input_shape.size(); in Compile() local 65 OP_REQUIRES(ctx, kRequiredDims == input_rank, in Compile() 67 "; got: ", input_rank)); in Compile() 69 int feature_dim = GetTensorFeatureDimIndex(input_rank, data_format); in Compile() 70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile() 75 reshaped_shape.reserve(input_rank); in Compile() 76 transpose_order.reserve(input_rank); in Compile() 77 output_shape.reserve(input_rank); in Compile()
|
D | spacetodepth_op.cc | 62 int input_rank = input_shape.size(); in Compile() local 65 OP_REQUIRES(ctx, kRequiredDims == input_rank, in Compile() 67 "; got ", input_rank)); in Compile() 69 int feature_dim = GetTensorFeatureDimIndex(input_rank, data_format); in Compile() 70 int num_spatial_dims = GetTensorSpatialDims(input_rank, data_format); in Compile() 75 reshaped_shape.reserve(input_rank); in Compile() 76 transpose_order.reserve(input_rank); in Compile() 77 output_shape.reserve(input_rank); in Compile()
|
D | batchtospace_op.cc | 28 const int input_rank = input_tensor_shape.dims(); in BatchToSpace() local 34 ctx, input_rank >= 1 + block_rank, in BatchToSpace() 36 " instead of ", input_rank)); in BatchToSpace() 70 std::vector<int64> reshaped_shape(input_rank + block_rank); in BatchToSpace() 105 std::vector<int64> reshaped_permuted_shape(input_rank); in BatchToSpace() 125 std::vector<int64> start_indices(input_rank, 0); in BatchToSpace() 127 std::vector<int64> strides(input_rank, 1); in BatchToSpace()
|
D | spacetobatch_op.cc | 28 const int input_rank = input_tensor_shape.dims(); in SpaceToBatch() local 34 ctx, input_rank >= 1 + block_rank, in SpaceToBatch() 36 " instead of ", input_rank)); in SpaceToBatch() 89 std::vector<int64> reshaped_padded_shape(input_rank + block_rank); in SpaceToBatch() 136 std::vector<int64> output_shape(input_rank); in SpaceToBatch()
|
D | quantize_and_dequantize_op.cc | 81 int64 input_rank = input_shape.dims(); in Compile() local 82 OP_REQUIRES(ctx, input_rank >= 1, in Compile() 86 ctx, axis_ >= 0 && axis_ < input_rank, in Compile() 88 dimensions_to_reduce.reserve(input_rank - 1); in Compile() 89 for (int64 i = 0; i < input_rank; ++i) { in Compile()
|
D | data_format_ops.cc | 109 int input_rank = input_tensor_shape.dims(); in Compile() local 110 OP_REQUIRES(ctx, input_rank == 1 || input_rank == 2, in Compile() 121 if (input_rank == 2) { in Compile()
|
/external/tensorflow/tensorflow/core/kernels/linalg/ |
D | linalg_ops_common.cc | 120 int input_rank = -1; in AnalyzeInputs() local 124 input_rank = in.dims(); in AnalyzeInputs() 126 context, input_rank >= 2, in AnalyzeInputs() 128 " must have rank >= 2, got ", input_rank)); in AnalyzeInputs() 132 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs() 137 OP_REQUIRES(context, input_rank == in.dims(), in AnalyzeInputs() 140 for (int dim = 0; dim < input_rank - 2; ++dim) { in AnalyzeInputs() 148 const int row_dimension = input_rank - 2; in AnalyzeInputs() 149 const int col_dimension = input_rank - 1; in AnalyzeInputs()
|
D | lu_op.cc | 71 int input_rank = input.dims(); in Compute() local 72 OP_REQUIRES(context, input_rank >= 2, in Compute() 74 "Input tensor must have rank >= 2, got ", input_rank)); in Compute() 81 for (int dim = 0; dim < input_rank - 2; ++dim) { in Compute() 84 const int64 num_rows = input.dim_size(input_rank - 2); in Compute() 85 const int64 num_cols = input.dim_size(input_rank - 1); in Compute()
|
D | lu_op_gpu.cu.cc | 87 const int input_rank = input.dims(); in ComputeAsync() local 90 context, input_rank >= 2, in ComputeAsync() 91 errors::InvalidArgument("Input must have rank >= 2, got ", input_rank), in ComputeAsync() 94 const int64 num_rows = input.dim_size(input_rank - 2); in ComputeAsync() 95 const int64 num_cols = input.dim_size(input_rank - 1); in ComputeAsync() 104 for (int dim = 0; dim < input_rank - 2; ++dim) { in ComputeAsync()
|
D | matrix_set_diag_op.cc | 90 const int input_rank = input_shape.dims(); in Compute() local 103 const Eigen::Index num_rows = input_shape.dim_size(input_rank - 2); in Compute() 104 const Eigen::Index num_cols = input_shape.dim_size(input_rank - 1); in Compute() 129 (diag_shape.dim_size(input_rank - 2) == num_diags), in Compute()
|
/external/tensorflow/tensorflow/compiler/mlir/tosa/transforms/ |
D | legalize_common.cc | 90 int32_t input_rank = input_type.getShape().size(); in convertPackOp() local 91 if (axis < 0) axis += input_rank; in convertPackOp() 143 if (axis < 0) axis += input_rank; in convertPackOp() 269 int64_t input_rank = input_shape.size(); in convertUnpackOp() local 274 if (axis < 0) axis += input_rank; in convertUnpackOp() 285 SmallVector<int64_t, 2> a1_transpose_shape(input_rank); in convertUnpackOp() 288 for (int i = 0; i < input_rank; i++) { in convertUnpackOp() 296 for (int i = 0; i < input_rank; i++) { in convertUnpackOp() 577 auto input_rank = input_type.getShape().size(); in convertConcatV2Op() local 579 if (axis < 0) axis += input_rank; in convertConcatV2Op() [all …]
|
/external/tensorflow/tensorflow/core/common_runtime/ |
D | eval_const_tensor.cc | 57 int input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local 58 Tensor t(node->output_type(0), TensorShape({input_rank})); in TryToInferTensorOutputFromInputShapes() 61 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes() 72 for (int i = 0; i < input_rank; i++) { in TryToInferTensorOutputFromInputShapes() 85 int32 input_rank = c->Rank(c->input(0)); in TryToInferTensorOutputFromInputShapes() local 87 t.flat<int32>()(0) = input_rank; in TryToInferTensorOutputFromInputShapes()
|
/external/tensorflow/tensorflow/core/framework/ |
D | common_shape_fns.cc | 1290 const int32 input_rank = c->Rank(input_shape); in MatrixDiagPartV2Shape() local 1291 const int32 num_rows = c->Value(c->Dim(input_shape, input_rank - 2)); in MatrixDiagPartV2Shape() 1292 const int32 num_cols = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagPartV2Shape() 1309 dims.reserve(input_rank - 2); in MatrixDiagPartV2Shape() 1310 for (int i = 0; i < input_rank - 2; ++i) { in MatrixDiagPartV2Shape() 1348 const int32 input_rank = c->Rank(input_shape); in MatrixDiagV2Shape() local 1350 const int32 num_diags = c->Value(c->Dim(input_shape, input_rank - 2)); in MatrixDiagV2Shape() 1351 const int32 other_dim = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagV2Shape() 1358 ", d_upper = ", upper_diag_index, " ", input_rank, " ", other_dim); in MatrixDiagV2Shape() 1377 const int32 max_diag_len = c->Value(c->Dim(input_shape, input_rank - 1)); in MatrixDiagV2Shape() [all …]
|
D | shape_inference.cc | 957 int idx, int input_rank, DimensionHandle* out) { in MakeDimForScalarInputWithNegativeIndexing() argument 966 if (input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing() 969 } else if (val + input_rank < 0) { in MakeDimForScalarInputWithNegativeIndexing() 971 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing() 972 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing() 974 val += input_rank; in MakeDimForScalarInputWithNegativeIndexing() 976 } else if (input_rank >= 0 && val >= input_rank) { in MakeDimForScalarInputWithNegativeIndexing() 978 val, " must be in range [-", input_rank, in MakeDimForScalarInputWithNegativeIndexing() 979 ", ", input_rank, ")"); in MakeDimForScalarInputWithNegativeIndexing()
|
/external/tensorflow/tensorflow/core/ops/ |
D | array_ops.cc | 1472 int64 input_rank = c->Rank(input); in UniqueIdxShapeFn() local 1473 if (axis < -input_rank || axis >= input_rank) { in UniqueIdxShapeFn() 1475 -input_rank, ", ", input_rank, ")"); in UniqueIdxShapeFn() 1478 axis += input_rank; in UniqueIdxShapeFn() 1629 const int32 input_rank = c->Rank(input); in __anon42d741192402() local 1630 if (batch_dim >= input_rank) { in __anon42d741192402() 1632 "batch_dim must be < input rank: ", batch_dim, " vs. ", input_rank); in __anon42d741192402() 1634 if (seq_dim >= input_rank) { in __anon42d741192402() 1636 "seq_dim must be < input rank: ", seq_dim, " vs. ", input_rank); in __anon42d741192402() 1963 const Tensor* paddings_t, int64 input_rank) { in MirrorPadKnown() argument [all …]
|
D | math_ops.cc | 1054 const int32 input_rank = c->Rank(input_shape); in ArgOpShape() local 1055 if (input_rank <= 1) { in ArgOpShape() 1065 std::vector<DimensionHandle> dims(input_rank - 1); in ArgOpShape() 1081 int64 axis = dimension_val < 0 ? dimension_val + input_rank : dimension_val; in ArgOpShape() 1082 if (axis < 0 || axis >= input_rank) { in ArgOpShape() 1084 "Dimension (", dimension_val, ") must be in the range [", -input_rank, in ArgOpShape() 1085 ", ", input_rank, "), where ", input_rank, in ArgOpShape() 1091 for (int i = 0; i < input_rank; ++i) { in ArgOpShape()
|
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/transforms/ |
D | lower_tf.cc | 838 int64_t input_rank = input_type.getRank(); in matchAndRewrite() local 840 int64_t remaining_rank = input_rank - 1 - block_rank; in matchAndRewrite() 863 RankedTensorType::get({input_rank, 2}, rewriter.getIntegerType(64)); in matchAndRewrite() 902 RankedTensorType::get({input_rank}, rewriter.getIntegerType(64)); in matchAndRewrite() 913 RankedTensorType::get({input_rank}, rewriter.getIntegerType(64)), in matchAndRewrite() 923 input_rank, RankedTensorType::get({1}, rewriter.getIntegerType(64))); in matchAndRewrite() 966 for (int64_t i = 1 + block_rank; i < input_rank; ++i) { in matchAndRewrite() 986 for (int64_t i = 1 + block_rank; i < input_rank; ++i) { in matchAndRewrite() 1002 for (int64_t i = 1 + block_rank; i < input_rank; ++i) { in matchAndRewrite() 1040 const int input_rank = input_ty.getRank(); in matchAndRewrite() local [all …]
|
/external/libtextclassifier/native/tensorflow_models/seq_flow_lite/tflite_ops/ |
D | layer_norm.cc | 234 const int input_rank = input->dims->size; in DefaultLayerNormFloat() local 235 const int num_features = input->dims->data[input_rank - 1]; in DefaultLayerNormFloat() 262 const int input_rank = input->dims->size; in DefaultLayerNorm() local 263 const int num_features = input->dims->data[input_rank - 1]; in DefaultLayerNorm()
|
/external/tensorflow/tensorflow/lite/toco/graph_transformations/ |
D | unpartition_embedding_lookup.cc | 200 gather_params_permute_op->input_rank = in Run() 220 merged_gather_op->input_rank = partition_array.shape().dimensions_count(); in Run()
|
/external/tensorflow/tensorflow/compiler/xla/ |
D | shape_util.cc | 1460 int64 input_rank = input_shape.rank(); in AlignLayouts() local 1482 std::vector<int64> dimension_to_alignment_index(input_rank); in AlignLayouts() 1484 for (int64 i = 0, j = 0; i < input_rank || j < output_rank;) { in AlignLayouts() 1493 if (i == input_rank) { in AlignLayouts() 1510 alignment.push_back({input_rank, output_rank}); in AlignLayouts() 1519 for (int64 i = 0; i < input_rank;) { in AlignLayouts() 1536 if (i == input_rank) { in AlignLayouts()
|
/external/tensorflow/tensorflow/compiler/mlir/xla/transforms/ |
D | legalize_tf.cc | 991 int64_t input_rank = input_ty.getRank(); in CanBeTranslatedToDynamicSlice() local 997 for (int64_t i = 0; i < input_rank; ++i) { in CanBeTranslatedToDynamicSlice() 1021 int64_t input_rank = input_ty.getRank(); in TFSliceSizes2HLOSliceSizes() local 1025 for (int64_t i = 0; i < input_rank; ++i) { in TFSliceSizes2HLOSliceSizes() 2921 int64_t input_rank = input_type.getRank(); in matchAndRewrite() local 2923 if (dim_index < 0) dim_index += input_rank; in matchAndRewrite() 2941 SmallVector<int64_t, 4> begin_indices(input_rank, 0); in matchAndRewrite() 2943 SmallVector<int64_t, 4> strides(input_rank, 1); in matchAndRewrite() 3037 int64_t input_rank = input_type.getRank(); in matchAndRewrite() local 3039 if (dim_index < 0) dim_index += input_rank; in matchAndRewrite() [all …]
|