Skip to content
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

pin_memory in DataLoader #153

Open
psteinb opened this issue Aug 23, 2024 · 1 comment
Open

pin_memory in DataLoader #153

psteinb opened this issue Aug 23, 2024 · 1 comment

Comments

@psteinb
Copy link
Contributor

psteinb commented Aug 23, 2024

Thanks for the library. I'm currently exploring it for somewhat larger images (greyscale, 3400x3400).

Is your feature request related to a problem? Please describe.
I discovered that the BaseTrainer does create a DataLoader, does not touch the pin_memory flag. For larger data like mine, it would be great if this parameter can be turned on OR the use gets an option to turn it on when configuring the Trainer.

Describe the solution you'd like
Either add a flag to BaseTrainerConfig or add something like dataloader_kwargs to it for use specific settings.

Describe alternatives you've considered
Providing my data in a custom DataLoader. That appears to work, but I am not sure what side effects this can have (thinking of DDP parallelisation scheme).

Additional context
Much of the benchmarks are performed with "small" data. RGB images with up to 64x64 pixels. And I also have the feeling that this was a predominant assumption when coding up the base encoders and such (lots of Linear layers).

@psteinb
Copy link
Contributor Author

psteinb commented Aug 23, 2024

Btw, I am happy to send a PR on this, but I'd feel more comfortable doing so after we discussed the matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant