Home
last modified time | relevance | path

Searched refs:new_dims (Results 1 – 25 of 27) sorted by relevance

12

/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Ddiag_op.cc105 std::vector<int64> new_dims(dims.size() * 2); in Compile() local
106 std::copy(dims.begin(), dims.end(), new_dims.begin()); in Compile()
107 std::copy(dims.begin(), dims.end(), new_dims.begin() + dims.size()); in Compile()
108 diag = xla::Reshape(diag, new_dims); in Compile()
137 std::vector<int64> new_dims; in Compile() local
145 new_dims.push_back(dims[i]); in Compile()
154 new_dims); in Compile()
Dtensor_list_ops.cc495 std::vector<int64> new_dims = {num_elements * tensor_lengths}; in Compile() local
498 new_dims.push_back(element_dims[i]); in Compile()
501 xla::XlaOp out = xla::Reshape(buffer, new_dims); in Compile()
551 std::vector<int64> new_dims = {element_dims[0] / length, length}; in Compile() local
553 new_dims.push_back(element_dims[i]); in Compile()
556 xla::XlaOp reshaped = xla::Reshape(input_tensor, new_dims); in Compile()
/external/tensorflow/tensorflow/core/kernels/
Dtranspose_functor_gpu.cu.cc102 TransposeDimsVec new_dims; in run() local
103 ReduceTransposeDimensions(in.shape(), perm, &new_perm, &new_dims); in run()
106 int dims = new_dims.size(); in run()
115 new_dims.insert(new_dims.begin(), 1); in run()
118 d, in_data, new_dims, out_data); in run()
126 d, in_data, new_dims, out_data); in run()
131 d, in_data, new_dims, out_data); in run()
Dtranspose_util_test.cc30 internal::TransposeDimsVec new_dims; in TestDimensionReduction() local
31 internal::ReduceTransposeDimensions(shape, perm, &new_perm, &new_dims); in TestDimensionReduction()
34 gtl::ArraySlice<int64> computed_dims(new_dims); in TestDimensionReduction()
Dtranspose_functor.h81 TransposeDimsVec* new_dims) { in ReduceTransposeDimensions() argument
87 (*new_dims)[0] = shape.dim_size(0); in ReduceTransposeDimensions()
112 new_dims->resize(dim_idx + 1); in ReduceTransposeDimensions()
118 (*new_dims)[dim_idx] = combined_dims[new_perm_idx]; in ReduceTransposeDimensions()
/external/tensorflow/tensorflow/c/
Dtf_tensor.cc171 TF_Tensor* to, const int64_t* new_dims, in TF_TensorBitcastFrom() argument
179 static_cast<tensorflow::DataType>(type), new_dims, num_new_dims)); in TF_TensorBitcastFrom()
220 const int64_t* new_dims, int num_new_dims) { in BitcastFrom() argument
223 s.AddDim(new_dims[i]); in BitcastFrom()
Dtf_tensor.h158 const int64_t* new_dims,
Dtf_tensor_internal.h110 const int64_t* new_dims, int num_new_dims);
Dc_api_test.cc1523 int64_t new_dims[] = {3, 2}; in TEST() local
1525 TF_TensorBitcastFrom(a, TF_UINT64, b, new_dims, 2, status); in TEST()
/external/tensorflow/tensorflow/lite/toco/graph_transformations/
Dresolve_constant_unary.cc85 std::vector<int> new_dims; in ReduceGeneric() local
88 new_dims.push_back(output_shape.dims(i)); in ReduceGeneric()
91 output_shape.mutable_dims()->swap(new_dims); in ReduceGeneric()
/external/tensorflow/tensorflow/compiler/xla/client/lib/
Dmatrix.cc525 std::vector<int64> new_dims; in Einsum() local
526 new_dims.reserve(output_rank); in Einsum()
530 new_dims.push_back(1); in Einsum()
532 new_dims.push_back(dot_shape.dimensions(dot_dim)); in Einsum()
535 return Reshape(dot, new_dims); in Einsum()
/external/tensorflow/tensorflow/compiler/xla/service/spmd/
Ddot_handler.cc781 std::vector<int64> new_dims; in PartitionBaseCase() local
784 new_dims.push_back(1); in PartitionBaseCase()
786 new_dims.push_back(slice_operand->shape().dimensions(i)); in PartitionBaseCase()
791 new_dims), in PartitionBaseCase()
939 std::vector<int64> new_dims(new_dot_shape.dimensions().begin(), in PartitionBaseCase() local
946 new_dims[slice_dim] /= 2; in PartitionBaseCase()
947 new_dims.insert(new_dims.begin() + slice_dim, 2); in PartitionBaseCase()
949 new_dims.push_back(1); in PartitionBaseCase()
952 ShapeUtil::MakeShape(original_hlo->shape().element_type(), new_dims); in PartitionBaseCase()
962 std::vector<int64> new_dims(dot_rhs->shape().dimensions().begin(), in PartitionBaseCase() local
[all …]
Dspmd_partitioner.cc2245 std::vector<int64> new_dims; in HandleBroadcast() local
2248 new_dims.push_back(i); in HandleBroadcast()
2253 new_dims), in HandleBroadcast()
2254 new_dims); in HandleBroadcast()
/external/tensorflow/tensorflow/python/ops/ragged/
Dragged_gather_ops.py322 new_dims = array_ops.ones([rank - array_ops.rank(t)], old_dims.dtype)
323 new_shape = array_ops.concat([old_dims, new_dims], axis=0)
/external/tensorflow/tensorflow/compiler/tf2xla/
Dxla_op_kernel.cc156 int index, absl::Span<const int64> new_dims, in ConstantInputReshaped() argument
184 if (!temp.CopyFrom(*constant, TensorShape(new_dims))) { in ConstantInputReshaped()
189 TensorShape(new_dims).DebugString()); in ConstantInputReshaped()
Dxla_op_kernel.h306 Status ConstantInputReshaped(int index, absl::Span<const int64> new_dims,
/external/tensorflow/tensorflow/python/framework/
Dtensor_shape.py973 new_dims = [
977 return TensorShape(new_dims)
/external/tensorflow/tensorflow/compiler/xla/service/
Dindexed_array_analysis.cc458 DimensionVector new_dims; in StripDegenerateDimensions() local
459 absl::c_copy_if(shape.dimensions(), std::back_inserter(new_dims), in StripDegenerateDimensions()
461 return ShapeUtil::MakeShape(shape.element_type(), new_dims); in StripDegenerateDimensions()
Dalgebraic_simplifier.cc3156 std::vector<int64> new_dims; in HandleBroadcast() local
3157 new_dims.reserve(new_operand->shape().rank()); in HandleBroadcast()
3160 new_dims.push_back(dims[i]); in HandleBroadcast()
3165 new_operand, new_dims)); in HandleBroadcast()
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DREADME.md1122 ### <Operation> sum(const Dimensions& new_dims)
1128 ### <Operation> mean(const Dimensions& new_dims)
1134 ### <Operation> maximum(const Dimensions& new_dims)
1140 ### <Operation> minimum(const Dimensions& new_dims)
1146 ### <Operation> prod(const Dimensions& new_dims)
1152 ### <Operation> all(const Dimensions& new_dims)
1158 ### <Operation> any(const Dimensions& new_dims)
1165 ### <Operation> reduce(const Dimensions& new_dims, const Reducer& reducer)
1254 ### <Operation> reshape(const Dimensions& new_dims)
1257 new dimensions. The argument new_dims is an array of Index values. The
[all …]
/external/tensorflow/tensorflow/python/ops/
Dnn_ops.py4995 new_dims = []
4998 new_dims.append(dim.value)
5000 new_dims.append(noise_shape_.dims[i].value)
5001 return tensor_shape.TensorShape(new_dims)
/external/tensorflow/tensorflow/compiler/tf2tensorrt/convert/
Dconvert_nodes.cc2669 nvinfer1::Dims new_dims; in ConvertExpandDims() local
2670 TF_RETURN_IF_ERROR(TensorShapeArrayToTrtDims(input_dims, &new_dims)); in ConvertExpandDims()
2672 params->converter, input_tensor, new_dims, /*validation_only=*/false, in ConvertExpandDims()
2777 nvinfer1::Dims new_dims; in SqueezeTensor() local
2779 TF_RETURN_IF_ERROR(TensorShapeArrayToTrtDims(*input_dims, &new_dims)); in SqueezeTensor()
2781 params->converter, TRT_TensorOrWeights(input), new_dims, in SqueezeTensor()
3043 nvinfer1::Dims new_dims; in ConvertStridedSliceHelper() local
3044 TF_RETURN_IF_ERROR(TensorShapeArrayToTrtDims(input_dims, &new_dims, in ConvertStridedSliceHelper()
3047 params->converter, TRT_TensorOrWeights(tensor), new_dims, in ConvertStridedSliceHelper()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dconstant_folding.cc1705 PartialTensorShape new_dims; in IsSimplifiableReshape() local
1712 TF_CHECK_OK(TensorShapeUtils::MakeShape(shp, &new_dims)); in IsSimplifiableReshape()
1719 TF_CHECK_OK(TensorShapeUtils::MakeShape(shp, &new_dims)); in IsSimplifiableReshape()
1722 return shape.IsCompatibleWith(new_dims); in IsSimplifiableReshape()
/external/tensorflow/tensorflow/compiler/mlir/lite/ir/
Dtfl_ops.cc343 int new_dims) { in GetPaddedShape() argument
344 std::vector<int64_t> new_shape(new_dims, 1); in GetPaddedShape()
/external/tensorflow/tensorflow/compiler/mlir/hlo/lib/Dialect/mhlo/IR/
Dhlo_ops.cc1730 llvm::SmallVector<APInt, 5> new_dims; in fold() local
1731 new_dims.reserve(dimensions().getNumElements()); in fold()

12