From 5d85a5508927977cd0cba42e7b627e1a2a5c5e70 Mon Sep 17 00:00:00 2001 From: Jingyue Wu Date: Fri, 9 Jan 2026 15:56:08 -0800 Subject: [PATCH] Minor cleanups in test_reduction.cpp --- tests/cpp/test_reduction.cpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/tests/cpp/test_reduction.cpp b/tests/cpp/test_reduction.cpp index b49d4d66c9e..511585b0add 100644 --- a/tests/cpp/test_reduction.cpp +++ b/tests/cpp/test_reduction.cpp @@ -2773,24 +2773,24 @@ TEST_P(TmaInnerReductionManualTest, Basic) { auto cg_outputs = ke.run({t0}); testValidate(&fusion_copy, cg_outputs, {t0}, __LINE__, __FILE__); } + INSTANTIATE_TEST_SUITE_P( , TmaInnerReductionManualTest, - ::testing::Combine( - ::testing::Values(2, 3), // ndims - ::testing::ValuesIn([] { // inner_size + testing::Combine( + testing::Values(2, 3), // ndims + testing::ValuesIn([] { // inner_size std::vector vals( Pow2Vals1to1Million.begin(), Pow2Vals1to1Million.end()); // Add some irregular numbers vals.insert(vals.end(), {1024 * 1024 + 8, 1024 * 1024 + 7, 1023}); return vals; }())), - [](const testing::TestParamInfo& info) { - int64_t ndims = std::get<0>(info.param); - int64_t inner_size = std::get<1>(info.param); + ([](const testing::TestParamInfo& info) { + auto [ndims, inner_size] = info.param; return "ndim_" + std::to_string(ndims) + "_inner_size_" + std::to_string(inner_size); - }); + })); namespace tma_reduction_check { bool isTmaParams(const FusionExecutorCache& executor_cache) { @@ -2879,7 +2879,7 @@ TEST_P(TmaInnerReductionTest, Sum) { INSTANTIATE_TEST_SUITE_P( , TmaInnerReductionTest, - ::testing::Combine( + testing::Combine( testing::Values(DataType::Float, DataType::BFloat16), testing::ValuesIn([] { std::vector vals( @@ -2888,12 +2888,11 @@ INSTANTIATE_TEST_SUITE_P( vals.insert(vals.end(), {1024 * 1024 + 8, 1024 * 1024 + 7, 1023}); return vals; }())), - [](const testing::TestParamInfo& info) { - auto dtype = std::get<0>(info.param); - auto reduction_size = std::get<1>(info.param); + ([](const testing::TestParamInfo& info) { + auto [dtype, reduction_size] = info.param; std::ostringstream os; os << dtype << "_" << reduction_size; return os.str(); - }); + })); } // namespace nvfuser