Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
superbenchmark
Commits
4c5417f7
Unverified
Commit
4c5417f7
authored
Apr 12, 2023
by
Yifan Xiong
Committed by
GitHub
Apr 12, 2023
Browse files
Add num_workers argument in model benchmark (#511)
Change num_workers to configurable in model benchmark data loader.
parent
10380709
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
superbench/benchmarks/model_benchmarks/model_base.py
superbench/benchmarks/model_benchmarks/model_base.py
+7
-0
superbench/benchmarks/model_benchmarks/pytorch_base.py
superbench/benchmarks/model_benchmarks/pytorch_base.py
+1
-1
tests/benchmarks/model_benchmarks/test_model_base.py
tests/benchmarks/model_benchmarks/test_model_base.py
+2
-0
No files found.
superbench/benchmarks/model_benchmarks/model_base.py
View file @
4c5417f7
...
...
@@ -78,6 +78,13 @@ def add_parser_arguments(self):
required
=
False
,
help
=
'The number of batch size.'
,
)
self
.
_parser
.
add_argument
(
'--num_workers'
,
type
=
int
,
default
=
8
,
required
=
False
,
help
=
'Number of subprocesses to use for data loading.'
,
)
self
.
_parser
.
add_argument
(
'--precision'
,
type
=
Precision
,
...
...
superbench/benchmarks/model_benchmarks/pytorch_base.py
View file @
4c5417f7
...
...
@@ -181,7 +181,7 @@ def _init_dataloader(self):
dataset
=
self
.
_dataset
,
batch_size
=
self
.
_args
.
batch_size
,
shuffle
=
False
,
num_workers
=
8
,
num_workers
=
self
.
_args
.
num_workers
,
sampler
=
train_sampler
,
drop_last
=
True
,
pin_memory
=
self
.
_args
.
pin_memory
...
...
tests/benchmarks/model_benchmarks/test_model_base.py
View file @
4c5417f7
...
...
@@ -167,6 +167,7 @@ def test_arguments_related_interfaces():
--no_gpu Disable GPU training.
--num_steps int The number of test step.
--num_warmup int The number of warmup step.
--num_workers int Number of subprocesses to use for data loading.
--pin_memory Enable option to pin memory in data loader.
--precision Precision [Precision ...]
Model precision. E.g. fp8_hybrid fp8_e4m3 fp8_e5m2
...
...
@@ -206,6 +207,7 @@ def test_preprocess():
--no_gpu Disable GPU training.
--num_steps int The number of test step.
--num_warmup int The number of warmup step.
--num_workers int Number of subprocesses to use for data loading.
--pin_memory Enable option to pin memory in data loader.
--precision Precision [Precision ...]
Model precision. E.g. fp8_hybrid fp8_e4m3 fp8_e5m2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment