Skip to content

Commit 14edf13

Browse files
committed
Add gradient accumulation integration test
1 parent 46954b6 commit 14edf13

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/integration_tests.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,20 @@ def build_test_list():
494494
"Float8 emulation test",
495495
"float8_emulation",
496496
),
497+
OverrideDefinitions(
498+
[
499+
[
500+
# Default local batch size = 8, and `ngpu=2`, so
501+
# default global batch size = 8 * 2 = 16.
502+
# To achieve 2 gradient accumulation steps, multiply
503+
# default global batch size by 2. 16 * 2 = 32.
504+
"--training.global_batch_size 32",
505+
],
506+
],
507+
"Gradient accumulation",
508+
"gradient_accumulation",
509+
ngpu=2,
510+
),
497511
]
498512
return integration_tests_flavors
499513

0 commit comments

Comments
 (0)