Skip to content

Commit

Permalink
Update typo which gives issue for pytorch 1.3.1 (#103)
Browse files Browse the repository at this point in the history
* Update typo which gives issue for pytorch 1.3.1

On lassen we use 1.3.1 which showed this bug.

* persistent workers do not exist in 1.3.1
  • Loading branch information
hariharan-devarajan authored Oct 16, 2023
1 parent b63cafc commit 5b98fa1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dlio_benchmark/data_loader/torch_data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,11 @@ def read(self):
kwargs={}
else:
kwargs={'multiprocessing_context':self._args.multiprocessing_context,
'prefetch_factor': prefetch_factor,
'persistent_workers': True}
'prefetch_factor': prefetch_factor}
if torch.__version__ != '1.3.1':
kwargs['persistent_workers'] = True
if torch.__version__ == '1.3.1':
if 'prefetch_factor' in kargs:
if 'prefetch_factor' in kwargs:
del kwargs['prefetch_factor']
self._dataset = DataLoader(dataset,
batch_size=self.batch_size,
Expand Down

0 comments on commit 5b98fa1

Please sign in to comment.