Home
last modified time | relevance | path

Searched refs:common_factors (Results 1 – 3 of 3) sorted by relevance

/external/tensorflow/tensorflow/compiler/xla/service/llvm_ir/
Dir_array.cc126 std::vector<std::pair<int64, int64>> common_factors = in SourceIndexOfReshape() local
134 for (ssize_t k = common_factors.size() - 2; k >= 0; --k) { in SourceIndexOfReshape()
137 multidim_, common_factors[k].second, in SourceIndexOfReshape()
138 common_factors[k + 1].second - common_factors[k].second)) in SourceIndexOfReshape()
142 common_factors[k].second, in SourceIndexOfReshape()
143 common_factors[k + 1].second - common_factors[k].second), in SourceIndexOfReshape()
148 for (int64 i = common_factors[k + 1].first - 1; in SourceIndexOfReshape()
149 i >= common_factors[k].first; --i) { in SourceIndexOfReshape()
153 } else if (i == common_factors[k].first) { in SourceIndexOfReshape()
/external/tensorflow/tensorflow/compiler/xla/
Dshape_util.cc1058 auto common_factors = CommonFactors(AsInt64Slice(input_shape.dimensions()), in DimensionsUnmodifiedByReshape() local
1060 for (size_t i = 0; i < common_factors.size() - 1;) { in DimensionsUnmodifiedByReshape()
1061 if (1 != common_factors[i + 1].first - common_factors[i].first || in DimensionsUnmodifiedByReshape()
1062 1 != common_factors[i + 1].second - common_factors[i].second) { in DimensionsUnmodifiedByReshape()
1063 common_factors.erase(common_factors.begin() + i); in DimensionsUnmodifiedByReshape()
1069 common_factors.pop_back(); in DimensionsUnmodifiedByReshape()
1070 return common_factors; in DimensionsUnmodifiedByReshape()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Darithmetic_optimizer.cc907 std::set<string> common_factors; in TrySimplifyAndReplaceUses() local
909 if (i > 0 && common_factors.empty()) { in TrySimplifyAndReplaceUses()
919 std::swap(common_factors, factors_i); in TrySimplifyAndReplaceUses()
923 factors_i.begin(), factors_i.end(), common_factors.begin(), in TrySimplifyAndReplaceUses()
924 common_factors.end(), in TrySimplifyAndReplaceUses()
926 std::swap(common_factors, intersection); in TrySimplifyAndReplaceUses()
929 common_factors.clear(); in TrySimplifyAndReplaceUses()
932 if (common_factors.size() == 1) { in TrySimplifyAndReplaceUses()
933 const string& common_factor = *common_factors.begin(); in TrySimplifyAndReplaceUses()