Skip to content

Commit c8d768d

Browse files
youge325claude
andcommitted
test(scatter_reduce): fix AmaxFloatNoIncludeSelf self value
Change self from 5.0f to 25.0f so some src values are below self and some are above, ensuring the test can distinguish include_self=true vs false behavior. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent e1ef593 commit c8d768d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/ATen/ops/ScatterReduceTest.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,9 @@ TEST_F(ScatterReduceTest, ScatterReduceAmaxFloatNoIncludeSelf) {
441441
file.openAppend();
442442
file << "ScatterReduceAmaxFloatNoIncludeSelf ";
443443

444-
at::Tensor self = at::full({3, 5}, 5.0f, at::kFloat);
444+
// Use self=25.0f so some src values are below self (10, 20) and some above
445+
// (30, 40, 50). This ensures amax with include_self=false differs from true.
446+
at::Tensor self = at::full({3, 5}, 25.0f, at::kFloat);
445447
at::Tensor index = make_index_1x5();
446448
at::Tensor src = at::full({1, 5}, 1.0f, at::kFloat);
447449
src.data_ptr<float>()[0] = 10.0f;

0 commit comments

Comments
 (0)