Skip to content

Commit

Permalink
[xla:cpu] scatter_benchmark: remove unique_indices=true
Browse files Browse the repository at this point in the history
It's not clear to me that the update slices cannot overlap, regardless
of parameter values. (If they were simple scatters I'd easily
reason about this, but alas, they're not). Remove the flags then.

PiperOrigin-RevId: 716233312
  • Loading branch information
cota authored and Google-ML-Automation committed Jan 16, 2025
1 parent 856089b commit 1e94534
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions xla/backends/cpu/benchmarks/scatter_benchmark_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace xla::cpu {
namespace {

// Generate random indices to be used in the scatter.
// They must be unique so we randomly select from the range [0, slice_size)
// To make them unique, we randomly select from the range [0, slice_size)
// by first shuffling the full range and then taking the first slice_size
// elements
Literal createR1ScatterIndices(int64_t domain_size, int64_t scatter_size,
Expand Down Expand Up @@ -77,8 +77,7 @@ void BM_ScatterS32_R1(benchmark::State& state) {
update_window_dims={},
inserted_window_dims={0},
scatter_dims_to_operand_dims={0},
index_vector_dim=1,
unique_indices=true
index_vector_dim=1
}
)";

Expand Down Expand Up @@ -125,8 +124,7 @@ void BM_ScatterS32_R2(benchmark::State& state) {
update_window_dims={1},
inserted_window_dims={0},
scatter_dims_to_operand_dims={0},
index_vector_dim=1,
unique_indices=true
index_vector_dim=1
}
)";

Expand Down Expand Up @@ -172,8 +170,7 @@ void BM_ScatterS32_R3(benchmark::State& state) {
update_window_dims={1, 2},
inserted_window_dims={0},
scatter_dims_to_operand_dims={0},
index_vector_dim=1,
unique_indices=true
index_vector_dim=1
}
)";

Expand Down

0 comments on commit 1e94534

Please sign in to comment.