Home
last modified time | relevance | path

Searched refs:dim_index (Results 1 – 25 of 58) sorted by relevance

123

/external/tensorflow/tensorflow/core/kernels/
Dreduction_ops_common.cc111 int dim_index = 0; in Simplify() local
112 for (; dim_index < data.dims(); ++dim_index) { in Simplify()
113 if (data.dim_size(dim_index) != 1) break; in Simplify()
115 if (dim_index >= data.dims()) { in Simplify()
129 reduce_first_axis_ = bitmap[dim_index]; in Simplify()
130 data_reshape_.push_back(data.dim_size(dim_index)); in Simplify()
131 ++dim_index; in Simplify()
132 for (; dim_index < data.dims(); ++dim_index) { in Simplify()
133 const auto size = data.dim_size(dim_index); in Simplify()
135 bitmap[dim_index] = bitmap[dim_index - 1]; in Simplify()
[all …]
/external/eigen/unsupported/Eigen/CXX11/src/Tensor/
DTensorPadding.h512 Index index, int dim_index) const {
514 return (!internal::index_pair_first_statically_eq<PaddingDimensions>(dim_index, 0) &&
515 index < m_padding[dim_index].first) ||
516 (!internal::index_pair_second_statically_eq<PaddingDimensions>(dim_index, 0) &&
517 index >= m_dimensions[dim_index] - m_padding[dim_index].second);
519 return (index < m_padding[dim_index].first) ||
520 (index >= m_dimensions[dim_index] - m_padding[dim_index].second);
525 int dim_index) const {
527 return internal::index_pair_first_statically_eq<PaddingDimensions>(dim_index, 0);
529 EIGEN_UNUSED_VARIABLE(dim_index);
[all …]
/external/skia/modules/skottie/src/effects/
DGaussianBlurEffect.cpp57 const auto dim_index = SkTPin<size_t>(static_cast<size_t>(fDimensions), in onSync() local
62 fBlur->setSigma({ sigma * kDimensionsMap[dim_index].x(), in onSync()
63 sigma * kDimensionsMap[dim_index].y() }); in onSync()
/external/tensorflow/tensorflow/compiler/xla/service/
Ddynamic_padder.cc377 HloInstruction* dim_index = in GenerateBinaryMask() local
385 pred_input_shape, dim_index, broadcasted_effective_size, in GenerateBinaryMask()
912 for (int64_t dim_index = 0; dim_index < input_window->dimensions_size(); in RewriteInputWithDynamicPadding() local
913 ++dim_index) { in RewriteInputWithDynamicPadding()
914 if (padding_before[dim_index] == nullptr) { in RewriteInputWithDynamicPadding()
917 int64_t shape_dim = window_dim_to_shape_dim(dim_index); in RewriteInputWithDynamicPadding()
919 WindowDimension* window_dim = input_window->mutable_dimensions(dim_index); in RewriteInputWithDynamicPadding()
938 padding_before[dim_index])); in RewriteInputWithDynamicPadding()
1186 for (int64_t dim_index = 0; dim_index < rank; ++dim_index) { in RewriteDynamicReduceWindowSamePadding() local
1189 dim_index); in RewriteDynamicReduceWindowSamePadding()
[all …]
/external/tensorflow/tensorflow/core/framework/
Dtensor.cc1089 void PrintOneDim(int dim_index, const gtl::InlinedVector<int64, 4>& shape, in PrintOneDim() argument
1093 int64_t element_count = shape[dim_index]; in PrintOneDim()
1095 if (dim_index == shape_size - 1) { in PrintOneDim()
1099 if (dim_index != 0) { in PrintOneDim()
1117 PrintOneDim(dim_index + 1, shape, limit, shape_size, data, data_index, in PrintOneDim()
1127 void PrintDimSpacing(int dim_index, int num_dims, string* result) { in PrintDimSpacing() argument
1128 if (dim_index == num_dims - 1) { in PrintDimSpacing()
1132 for (int j = 0; j < num_dims - dim_index - 1; j++) { in PrintDimSpacing()
1135 for (int j = 0; j <= dim_index; j++) { in PrintDimSpacing()
1142 void PrintOneDimV2(int dim_index, const gtl::InlinedVector<int64, 4>& shape, in PrintOneDimV2() argument
[all …]
/external/tensorflow/tensorflow/dtensor/mlir/expansions/
Dmeta_spmd_expander.cc406 for (int dim_index = 0; dim_index < operand_shards.size(); ++dim_index) { in ExpandOp() local
407 if (static_multiples[dim_index] == 1) { in ExpandOp()
408 local_tile_multiples.push_back(static_multiples[dim_index]); in ExpandOp()
411 if (output_shards[dim_index] > static_multiples[dim_index]) in ExpandOp()
417 if (static_multiples[dim_index] % output_shards[dim_index] != 0) in ExpandOp()
421 operand_layout->sharding_spec(dim_index)) && in ExpandOp()
423 output_layout->sharding_spec(dim_index)) || in ExpandOp()
424 (operand_layout->sharding_spec(dim_index) != in ExpandOp()
425 output_layout->sharding_spec(dim_index)))) in ExpandOp()
427 "Input is replicated on tensor dimension ", dim_index, in ExpandOp()
[all …]
Delementwise_spmd_expander.cc168 const int dim_index = dim_shape_and_index.index(); in ComputeLayoutBackward() local
171 inferred_operand_layout_strs[dim_index] = Layout::kUnshardedDim; in ComputeLayoutBackward()
/external/tensorflow/tensorflow/c/eager/
Dc_api_debug.cc82 TFE_TensorDebugInfo* debug_info, int dim_index) { in TFE_TensorDebugInfoOnDeviceDim() argument
83 return debug_info->dev_dims[dim_index]; in TFE_TensorDebugInfoOnDeviceDim()
Dcustom_device_testutil.cc48 int64_t LoggedTensorDim(void* data, int dim_index, TF_Status* status) { in LoggedTensorDim() argument
50 dim_index, status); in LoggedTensorDim()
/external/tensorflow/tensorflow/lite/c/
Dc_api_opaque.cc30 int32_t dim_index) { in TfLiteOpaqueTensorDim() argument
32 dim_index); in TfLiteOpaqueTensorDim()
Dc_api_opaque.h45 const TfLiteOpaqueTensor* opaque_tensor, int32_t dim_index);
/external/tensorflow/tensorflow/compiler/tf2xla/kernels/
Dshape_op.cc132 int64_t dim_index; in Compile() local
133 OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntScalar("dim_index", &dim_index)); in Compile()
136 xla::SetDimensionSize(ctx->Input(0), ctx->Input("size"), dim_index); in Compile()
161 int64_t dim_index; in Compile() local
162 OP_REQUIRES_OK(ctx, ctx->ConstantInputAsIntScalar("dim_index", &dim_index)); in Compile()
164 xla::XlaOp result = xla::RemoveDynamicDimension(ctx->Input(0), dim_index); in Compile()
/external/tensorflow/tensorflow/core/common_runtime/eager/
Dtensor_handle_data.cc58 Status LocalTensorHandleData::Dim(int dim_index, int64_t* dim) const { in Dim() argument
61 *dim = tensor_.dim_size(dim_index); in Dim()
Dtensor_handle.cc91 Status TensorHandle::PackedTensorHandleData::Dim(int dim_index, in Dim() argument
93 *dim = shape_.dim_size(dim_index); in Dim()
638 Status TensorHandle::Dim(int dim_index, int64_t* dim) const { in Dim() argument
641 inference_shape_.dim_size(dim_index) != -1) { in Dim()
642 *dim = inference_shape_.dim_size(dim_index); in Dim()
646 [dim_index, dim](auto& data) { return data.Dim(dim_index, dim); }, in Dim()
Dcustom_device_test.cc79 Status Dim(int dim_index, int64_t* dim) const override { in Dim() argument
80 if (dim_index == 0) { in Dim()
/external/tensorflow/tensorflow/c/
Dtf_tensor.cc158 int64_t TF_Dim(const TF_Tensor* t, int dim_index) { in TF_Dim() argument
159 return t->tensor->Dim(dim_index); in TF_Dim()
222 int64_t TensorInterface::Dim(int dim_index) const { in Dim()
223 return static_cast<int64_t>(tensor_.dim_size(dim_index)); in Dim()
Dtensor_interface.h40 virtual int64_t Dim(int dim_index) const = 0;
/external/tensorflow/tensorflow/java/src/main/native/
Deager_operation_jni.cc135 jint dim_index) { in Java_org_tensorflow_EagerOperation_dim() argument
139 int64_t dim = TFE_TensorHandleDim(tensor_handle, dim_index, status); in Java_org_tensorflow_EagerOperation_dim()
/external/tensorflow/tensorflow/compiler/xla/
Dliteral.cc334 int32_t LiteralBase::GetDynamicSize(int64_t dim_index) const { in GetDynamicSize()
335 return GetDynamicSize(dim_index, {}); in GetDynamicSize()
338 int32_t LiteralBase::GetDynamicSize(int64_t dim_index, in GetDynamicSize() argument
340 return piece(shape_index).GetDynamicSize(dim_index); in GetDynamicSize()
570 int32_t LiteralBase::Piece::GetDynamicSize(int64_t dim_index) const { in GetDynamicSize()
572 if (!subshape_->is_dynamic_dimension(dim_index)) { in GetDynamicSize()
574 return subshape_->dimensions(dim_index); in GetDynamicSize()
576 return dynamic_size_buffer()[dim_index]; in GetDynamicSize()
579 void LiteralBase::Piece::SetDynamicSize(int64_t dim_index, int32_t size) { in SetDynamicSize() argument
581 CHECK(subshape_->is_dynamic_dimension(dim_index)); in SetDynamicSize()
[all …]
/external/tensorflow/tensorflow/core/distributed_runtime/eager/
Dremote_tensor_handle_data.cc143 Status RemoteTensorHandleData::Dim(int dim_index, int64_t* dim) const { in Dim() argument
147 *dim = shape_.dim_size(dim_index); in Dim()
Dremote_tensor_handle_data.h46 Status Dim(int dim_index, int64_t* dim) const;
/external/eigen/unsupported/test/
Dcxx11_tensor_block_access.cpp106 Index first_coeff_index, int dim_index, std::set<Index>* visited_coeffs) { in UpdateCoeffSet() argument
109 for (int i = 0; i < block_sizes[dim_index]; ++i) { in UpdateCoeffSet()
110 if (tensor_strides[dim_index] == 1) { in UpdateCoeffSet()
115 int next_dim_index = dim_index + choose(Layout, -1, 1); in UpdateCoeffSet()
118 first_coeff_index += tensor_strides[dim_index]; in UpdateCoeffSet()
/external/tensorflow/tensorflow/lite/python/optimize/
Dcalibration_wrapper.cc150 for (size_t dim_index = 0; dim_index < size; ++dim_index) { in ConvertInputShapeToVector() local
151 PyObject* dim = PyList_GetItem(shape, dim_index); in ConvertInputShapeToVector()
152 dims[dim_index] = PyLong_AsLong(dim); in ConvertInputShapeToVector()
/external/tensorflow/tensorflow/compiler/mlir/xla/
Dattribute_importer.cc192 for (int64_t dim_index : xla_layout.minor_to_major()) in ExtractLayoutsFromShapes() local
193 layout.push_back(dim_index); in ExtractLayoutsFromShapes()
/external/tensorflow/tensorflow/compiler/mlir/tensorflow/ir/
Dtf_ops_n_z.cc1510 LogicalResult VerifySplitInputAndSplitDim(Op op, Optional<int64_t> *dim_index) { in VerifySplitInputAndSplitDim() argument
1511 *dim_index = llvm::None; in VerifySplitInputAndSplitDim()
1540 *dim_index = index; in VerifySplitInputAndSplitDim()
1547 Optional<int64_t> dim_index; in verify() local
1548 if (failed(VerifySplitInputAndSplitDim(op, &dim_index))) return failure(); in verify()
1549 if (!dim_index) return success(); in verify()
1552 op.value().getType().cast<RankedTensorType>().getDimSize(*dim_index); in verify()
1559 << *dim_index << " not divisible by the number of result tensors"; in verify()
1580 Optional<int64_t> dim_index = 0; in verify() local
1581 if (failed(VerifySplitInputAndSplitDim(op, &dim_index))) return failure(); in verify()
[all …]

123