Skip to content

Commit

Permalink
Replaced std::vector with absl::InlinedVector.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 587136655
  • Loading branch information
tensorflower-gardener committed Dec 1, 2023
1 parent 3987ee3 commit 79c1c93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion third_party/xla/xla/layout_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,8 @@ Layout CreateDefaultLayoutForRank(int64_t rank) {
absl::StrJoin(layout.minor_to_major(), ", "), shape.ShortDebugString());
}

std::vector<bool> dimensions_in_layout(shape.rank(), false);
absl::InlinedVector<bool, InlineRank()> dimensions_in_layout(shape.rank(),
false);
for (int64_t i = 0; i < shape.rank(); ++i) {
int64_t dim = layout.minor_to_major(i);
if (dim < 0 || dim >= shape.rank()) {
Expand Down

0 comments on commit 79c1c93

Please sign in to comment.