-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add PoolDataLoader for parrots #134
add PoolDataLoader for parrots #134
Conversation
Codecov Report
@@ Coverage Diff @@
## master #134 +/- ##
==========================================
- Coverage 82.44% 82.32% -0.12%
==========================================
Files 143 143
Lines 6609 6621 +12
Branches 979 986 +7
==========================================
+ Hits 5449 5451 +2
- Misses 1062 1071 +9
- Partials 98 99 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
In order to increase the speed, add PoolDataLoader for parrots. |
mmedit/datasets/builder.py
Outdated
|
||
from .dataset_wrappers import RepeatDataset | ||
from .registry import DATASETS | ||
from .samplers import DistributedSampler | ||
|
||
if torch.__version__ == 'parrots': | ||
from torch.utils.data import PoolDataLoader | ||
DataLoader = partial(PoolDataLoader, prefetch_num=2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The prefetch_num
may be set by config.
mmedit/datasets/builder.py
Outdated
@@ -133,6 +140,8 @@ def build_dataloader(dataset, | |||
worker_init_fn, num_workers=num_workers, rank=rank, | |||
seed=seed) if seed is not None else None | |||
|
|||
if torch.__version__ == 'parrots': | |||
pin_memory = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pin_memory
can also be set by config.
…der_pat add PoolDataLoader for parrots
Hi! We would also like to invite you to join our Special Interest Group (SIG) private channel on Discord, where you can share your experiences, ideas, and build connections with like-minded peers. To join the SIG channel, simply message moderator— OpenMMLab on Discord or briefly share your open-source contributions in the #introductions channel and we will assist you. Look forward to seeing you there! Join us :https://discord.gg/UjgXkPWNqA If you have WeChat account,welcome to join our community on WeChat. You can add our assistant :openmmlabwx. Please add "mmsig + Github ID" as a remark when adding friends:) |
In order to increase the speed, add PoolDataLoader for parrots.