"vscode:/vscode.git/clone" did not exist on "673d4357ff9f085f6f2cd9eebaff23fd1fd9990a"
Unverified Commit 4d9beb3b authored by nv-dlasalle's avatar nv-dlasalle Committed by GitHub
Browse files

[Fix] FIx check for num_workers for using ScalarDataBatcher (#3219)


Co-authored-by: default avatarQuan (Andy) Gan <coin2028@hotmail.com>
Co-authored-by: default avatarJinjing Zhou <VoVAllen@users.noreply.github.com>
parent 8c2f8ff8
......@@ -353,7 +353,7 @@ def _init_dataloader(collator, device, dataloader_kwargs, use_ddp, ddp_seed):
use_scalar_batcher = False
scalar_batcher = None
if th.device(device) != th.device('cpu') and dataloader_kwargs.get('num_workers', 0) != 0:
if th.device(device) != th.device('cpu') and dataloader_kwargs.get('num_workers', 0) == 0:
batch_size = dataloader_kwargs.get('batch_size', 1)
if batch_size > 1:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment