Home
last modified time | relevance | path

Searched refs:multi_index (Results 1 – 15 of 15) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/
Dliteral_comparison.cc51 absl::Span<const int64> multi_index) { in CompareFloatsBitwiseEqual() argument
62 absl::Span<const int64> multi_index) { in CompareEqual() argument
70 absl::Span<const int64> multi_index) { in CompareEqual() argument
71 return CompareFloatsBitwiseEqual<bfloat16, uint16>(lhs, rhs, multi_index); in CompareEqual()
75 absl::Span<const int64> multi_index) { in CompareEqual() argument
76 return CompareFloatsBitwiseEqual<Eigen::half, uint16>(lhs, rhs, multi_index); in CompareEqual()
80 absl::Span<const int64> multi_index) { in CompareEqual() argument
81 return CompareFloatsBitwiseEqual<float, uint32>(lhs, rhs, multi_index); in CompareEqual()
85 absl::Span<const int64> multi_index) { in CompareEqual() argument
86 return CompareFloatsBitwiseEqual<double, uint64>(lhs, rhs, multi_index); in CompareEqual()
[all …]
Dindex_util.cc29 const Shape& shape, absl::Span<const int64> multi_index) { in MultidimensionalIndexToLinearIndex() argument
30 DCHECK_EQ(shape.dimensions_size(), multi_index.size()); in MultidimensionalIndexToLinearIndex()
32 for (size_t i = 0; i < multi_index.size(); ++i) { in MultidimensionalIndexToLinearIndex()
33 DCHECK_GE(multi_index[i], 0); in MultidimensionalIndexToLinearIndex()
34 DCHECK_LT(multi_index[i], shape.dimensions(i)) in MultidimensionalIndexToLinearIndex()
36 << "\n\tindex: " << absl::StrJoin(multi_index, ",") in MultidimensionalIndexToLinearIndex()
81 linear_index = multi_index[dimension]; in MultidimensionalIndexToLinearIndex()
85 linear_index += scale * multi_index[dimension]; in MultidimensionalIndexToLinearIndex()
104 std::vector<int64> multi_index(shape.dimensions_size()); in LinearIndexToMultidimensionalIndex() local
109 multi_index[dimension] = in LinearIndexToMultidimensionalIndex()
[all …]
Dliteral.cc208 absl::Span<const int64> multi_index) { in CopySliceFromInternal() argument
209 return IndexUtil::MultidimensionalIndexToLinearIndex(shape, multi_index); in CopySliceFromInternal()
782 string LiteralBase::GetAsString(absl::Span<const int64> multi_index, in GetAsString() argument
788 return Get<bool>(multi_index, shape_index) ? "true" : "false"; in GetAsString()
790 return StrCat(Get<int8>(multi_index, shape_index)); in GetAsString()
792 return StrCat(Get<int16>(multi_index, shape_index)); in GetAsString()
794 return StrCat(Get<int32>(multi_index, shape_index)); in GetAsString()
796 return StrCat(Get<int64>(multi_index, shape_index)); in GetAsString()
798 return StrCat(Get<uint8>(multi_index, shape_index)); in GetAsString()
800 return StrCat(Get<uint16>(multi_index, shape_index)); in GetAsString()
[all …]
Dliteral.h107 NativeT Get(absl::Span<const int64> multi_index,
112 NativeT Get(absl::Span<const int64> multi_index) const;
121 string GetAsString(absl::Span<const int64> multi_index,
133 IsEqualAt(absl::Span<const int64> multi_index, T value) const { in IsEqualAt() argument
134 if (auto as_s64 = GetIntegralAsS64(multi_index)) { in IsEqualAt()
137 complex128 as_complex128 = *GetAsComplex128(multi_index); in IsEqualAt()
141 bool IsEqualAt(absl::Span<const int64> multi_index, complex128 value) const { in IsEqualAt() argument
142 if (auto as_s64 = GetIntegralAsS64(multi_index)) { in IsEqualAt()
145 auto as_complex128 = GetAsComplex128(multi_index); in IsEqualAt()
152 absl::Span<const int64> multi_index) const;
[all …]
Dindex_util_test.cc40 std::vector<int64> multi_index = in TEST() local
42 EXPECT_EQ(1, multi_index.size()); in TEST()
43 EXPECT_EQ(42, multi_index[0]); in TEST()
133 std::vector<int64> multi_index = in TEST() local
136 shape, multi_index)); in TEST()
Dindex_util.h39 const Shape& shape, absl::Span<const int64> multi_index);
Dliteral_util.cc510 absl::Span<const int64> multi_index) { in MultiIndexAsString() argument
511 return StrCat("{", absl::StrJoin(multi_index, ","), "}"); in MultiIndexAsString()
Dliteral_util.h290 static string MultiIndexAsString(absl::Span<const int64> multi_index);
/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dllvm_loop.cc245 std::vector<llvm::Value*> multi_index(shape.dimensions_size()); in AddLoopsForShapeOnDimensions() local
252 multi_index[dimension] = loop->GetIndVarValue(); in AddLoopsForShapeOnDimensions()
254 return multi_index; in AddLoopsForShapeOnDimensions()
275 std::vector<llvm::Value*> multi_index = in EmitOperandArrayLoopNest() local
279 for (size_t dimension = 0; dimension < multi_index.size(); ++dimension) { in EmitOperandArrayLoopNest()
281 DCHECK_EQ(nullptr, multi_index[dimension]); in EmitOperandArrayLoopNest()
283 DCHECK_NE(nullptr, multi_index[dimension]); in EmitOperandArrayLoopNest()
286 return multi_index; in EmitOperandArrayLoopNest()
/external/tensorflow/tensorflow/python/tools/
Doptimize_for_inference_lib.py361 current_scale = scale_value[it.multi_index[3]]
367 current_scale = scale_value[it.multi_index[2] * channel_multiplier +
368 it.multi_index[3]]
/external/tensorflow/tensorflow/python/keras/utils/
Dconv_utils.py395 multi_index=concat_idxs(output_position, f_out),
398 multi_index=concat_idxs(input_position, f_in),
/external/tensorflow/tensorflow/compiler/xla/service/
Dhlo_evaluator.cc99 result.Populate<bool>([&](absl::Span<const int64> multi_index) { in Compare() argument
100 return compare_op(lhs_literal.Get<OperandT>(multi_index), in Compare()
101 rhs_literal.Get<OperandT>(multi_index)); in Compare()
131 result.Populate<bool>([&](absl::Span<const int64> multi_index) { in Compare() argument
132 return compare_op(lhs_literal.Get<complex64>(multi_index), in Compare()
133 rhs_literal.Get<complex64>(multi_index)); in Compare()
163 result.Populate<bool>([&](absl::Span<const int64> multi_index) { in Compare() argument
164 return compare_op(lhs_literal.Get<complex128>(multi_index), in Compare()
165 rhs_literal.Get<complex128>(multi_index)); in Compare()
674 result.Populate<complex64>([&](absl::Span<const int64> multi_index) { in HandleComplex() argument
[all …]
Dhlo_evaluator.h330 result.Populate<ReturnT>([&](absl::Span<const int64> multi_index) { in ElementWiseUnaryOpImpl()
331 return unary_op(operand_literal.Get<NativeT>(multi_index)); in ElementWiseUnaryOpImpl()
Dhlo_evaluator_typed_visitor.h1440 [&scalar](absl::Span<const int64> multi_index) { return scalar; }));
1620 result.Populate<ReturnT>([&](absl::Span<const int64> multi_index) {
1630 auto curr_val = arg_literal.Get<NativeT>(multi_index);
2763 result.Populate<ReturnT>([&](absl::Span<const int64> multi_index) {
2765 CHECK_GE(multi_index[i] + start[i], 0);
2766 operand_indices[i] = multi_index[i] + start[i];
2843 result.Populate<ReturnT>([&](absl::Span<const int64> multi_index) {
2845 lhs_literal.Get<ReturnT>(multi_index),
2846 rhs_literal.Get<ReturnT>(multi_index));
2870 result.Populate<ReturnT>([&](absl::Span<const int64> multi_index) {
[all …]
Delemental_ir_emitter.cc1998 std::vector<llvm::Value*> multi_index = padded_index.multidim(); in EmitElementalPad() local
2000 for (size_t i = 0; i < multi_index.size(); ++i) { in EmitElementalPad()
2005 multi_index[i] = in EmitElementalPad()
2006 Sub(multi_index[i], index_typed_const(pad_dim.edge_padding_low())); in EmitElementalPad()
2007 in_bounds = And(in_bounds, ICmpSGE(multi_index[i], index_typed_const(0)), in EmitElementalPad()
2012 URem(multi_index[i], in EmitElementalPad()
2015 multi_index[i] = in EmitElementalPad()
2016 SDiv(multi_index[i], index_typed_const(pad_dim.interior_padding() + 1)); in EmitElementalPad()
2019 ICmpSLT(multi_index[i], in EmitElementalPad()
2035 llvm_ir::IrArray::Index index(multi_index, hlo->operand(0)->shape(), in EmitElementalPad()