Skip to content

Commit bde7ed6

Browse files
fix reduce cpp issue (#4409)
1 parent fac3f76 commit bde7ed6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/core/conversion/converters/test_reduce.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ TEST(Converters, ATenAnyDimNegativeNumericValueConvertsCorrectly) {
353353

354354
TEST(Converters, ATenAnyDimNumericRowsWithCancellationConvertsCorrectly) {
355355
const auto graph = gen_any_dim_graph(1, false);
356-
auto in = at::tensor({{1, -1}, {0, 0}}, at::TensorOptions().dtype(at::kInt).device(at::kCUDA));
356+
auto in = at::tensor({1, -1, 0, 0}, at::TensorOptions().dtype(at::kInt).device(at::kCUDA)).reshape({2, 2});
357357
test_body(graph, in);
358358
}
359359

@@ -365,7 +365,7 @@ TEST(Converters, ATenAnyDimFloatNumericValuesConvertsCorrectly) {
365365

366366
TEST(Converters, ATenAnyDimHalfNumericValuesConvertsCorrectly) {
367367
const auto graph = gen_any_dim_graph(0, false);
368-
auto in = at::tensor({1.0, -1.0}, at::TensorOptions().dtype(at::kHalf).device(at::kCUDA));
368+
auto in = at::tensor({1.0, -1.0}, at::TensorOptions().dtype(at::kFloat).device(at::kCUDA)).to(at::kHalf);
369369
test_body(graph, in);
370370
}
371371

0 commit comments

Comments
 (0)