Skip to content

Commit 3112de6

Browse files
Saif Hasanmeta-codesync[bot]
authored andcommitted
UT - Improve UT to run within reasonable duration
Summary: CtranDistAllReduceTest often is ommitted or timesout on CI - Even one test-case itself takes 10+ minutes to run. For CI 600s is a hard timeout and test fails. This test-binary have 6+ such test-cases. So the binary never ends up finishing. https://www.internalfb.com/intern/test/562950179205023?ref_report_id=0 Reviewed By: Regina8023 Differential Revision: D86633740 fbshipit-source-id: 3df67c910c6594a2cf6624159506dbf28234a7e4
1 parent 8aad9a9 commit 3112de6

File tree

1 file changed

+12
-44
lines changed

1 file changed

+12
-44
lines changed

comms/ctran/tests/CtranDistAllReduceTest.cc

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,9 @@ auto testingValues = ::testing::Values(
292292
std::make_tuple(1024, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
293293
std::make_tuple(8192, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
294294
std::make_tuple(8195, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
295+
std::make_tuple(1024 * 1024, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
295296
std::make_tuple(
296-
1024 * 1024 * 1024,
297-
kTestOutOfPlace,
298-
commSum,
299-
kMemNcclMemAlloc),
300-
std::make_tuple(
301-
1024 * 1024 * 1024 + 17,
297+
1024 * 1024 + 17,
302298
kTestOutOfPlace,
303299
commSum,
304300
kMemNcclMemAlloc),
@@ -313,16 +309,8 @@ auto testingValues = ::testing::Values(
313309
std::make_tuple(1024, kTestInPlace, commSum, kMemNcclMemAlloc),
314310
std::make_tuple(8192, kTestInPlace, commSum, kMemNcclMemAlloc),
315311
std::make_tuple(8195, kTestInPlace, commSum, kMemNcclMemAlloc),
316-
std::make_tuple(
317-
1024 * 1024 * 1024,
318-
kTestInPlace,
319-
commSum,
320-
kMemNcclMemAlloc),
321-
std::make_tuple(
322-
1024 * 1024 * 1024 + 17,
323-
kTestInPlace,
324-
commSum,
325-
kMemNcclMemAlloc),
312+
std::make_tuple(1024 * 1024, kTestInPlace, commSum, kMemNcclMemAlloc),
313+
std::make_tuple(1024 * 1024 + 17, kTestInPlace, commSum, kMemNcclMemAlloc),
326314
std::make_tuple(8195, kTestOutOfPlace, commProd, kMemNcclMemAlloc),
327315
std::make_tuple(8195, kTestInPlace, commProd, kMemNcclMemAlloc),
328316
std::make_tuple(8195, kTestOutOfPlace, commMax, kMemNcclMemAlloc),
@@ -400,13 +388,9 @@ auto testingValuesRing = ::testing::Values(
400388
std::make_tuple(1024, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
401389
std::make_tuple(8192, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
402390
std::make_tuple(8195, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
391+
std::make_tuple(1024 * 1024, kTestOutOfPlace, commSum, kMemNcclMemAlloc),
403392
std::make_tuple(
404-
1024 * 1024 * 1024,
405-
kTestOutOfPlace,
406-
commSum,
407-
kMemNcclMemAlloc),
408-
std::make_tuple(
409-
1024 * 1024 * 1024 + 17,
393+
1024 * 1024 + 17,
410394
kTestOutOfPlace,
411395
commSum,
412396
kMemNcclMemAlloc),
@@ -416,16 +400,8 @@ auto testingValuesRing = ::testing::Values(
416400
std::make_tuple(1024, kTestInPlace, commSum, kMemNcclMemAlloc),
417401
std::make_tuple(8192, kTestInPlace, commSum, kMemNcclMemAlloc),
418402
std::make_tuple(8195, kTestInPlace, commSum, kMemNcclMemAlloc),
419-
std::make_tuple(
420-
1024 * 1024 * 1024,
421-
kTestInPlace,
422-
commSum,
423-
kMemNcclMemAlloc),
424-
std::make_tuple(
425-
1024 * 1024 * 1024 + 17,
426-
kTestInPlace,
427-
commSum,
428-
kMemNcclMemAlloc),
403+
std::make_tuple(1024 * 1024, kTestInPlace, commSum, kMemNcclMemAlloc),
404+
std::make_tuple(1024 * 1024 + 17, kTestInPlace, commSum, kMemNcclMemAlloc),
429405
std::make_tuple(8195, kTestOutOfPlace, commProd, kMemNcclMemAlloc),
430406
std::make_tuple(8195, kTestInPlace, commProd, kMemNcclMemAlloc),
431407
std::make_tuple(8195, kTestOutOfPlace, commMax, kMemNcclMemAlloc),
@@ -435,27 +411,19 @@ auto testingValuesRing = ::testing::Values(
435411
std::make_tuple(16, kTestOutOfPlace, commAvg, kMemNcclMemAlloc),
436412
std::make_tuple(8195, kTestOutOfPlace, commAvg, kMemNcclMemAlloc),
437413
std::make_tuple(
438-
1024 * 1024 * 1024 + 15,
414+
1024 * 1024 + 15,
439415
kTestOutOfPlace,
440416
commAvg,
441417
kMemNcclMemAlloc),
442418
std::make_tuple(
443-
1024 * 1024 * 1024 + 17,
419+
1024 * 1024 + 17,
444420
kTestOutOfPlace,
445421
commAvg,
446422
kMemNcclMemAlloc),
447423
std::make_tuple(16, kTestInPlace, commAvg, kMemNcclMemAlloc),
448424
std::make_tuple(8195, kTestInPlace, commAvg, kMemNcclMemAlloc),
449-
std::make_tuple(
450-
1024 * 1024 * 1024 + 15,
451-
kTestInPlace,
452-
commAvg,
453-
kMemNcclMemAlloc),
454-
std::make_tuple(
455-
1024 * 1024 * 1024 + 17,
456-
kTestInPlace,
457-
commAvg,
458-
kMemNcclMemAlloc));
425+
std::make_tuple(1024 * 1024 + 15, kTestInPlace, commAvg, kMemNcclMemAlloc),
426+
std::make_tuple(1024 * 1024 + 17, kTestInPlace, commAvg, kMemNcclMemAlloc));
459427

460428
// Tests for UInt64
461429
INSTANTIATE_TEST_SUITE_P(

0 commit comments

Comments
 (0)