Skip to content

Commit 722f880

Browse files
authored
make micro bsz configurable (PaddlePaddle#52447)
1 parent 964497b commit 722f880

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

python/paddle/distributed/auto_parallel/parallelizer_v2.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,19 @@ def parallel(self, rank):
155155
time.time() - time0, self._mode
156156
)
157157
)
158+
micro_bsz = (
159+
1
160+
if not self._strategy.pipeline.enable
161+
else self._strategy.pipeline.micro_batch_size
162+
)
158163
time0 = time.time()
159164
resharder = Resharder(
160165
dist_main_prog,
161166
dist_startup_prog,
162167
rank,
163168
self._dist_context,
164169
[],
165-
1,
170+
micro_bsz,
166171
)
167172
resharder.reshard()
168173
self._logger.debug(

0 commit comments

Comments
 (0)