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

Memory issue when try to build customised model #326

Closed
CWYuan08 opened this issue Jan 10, 2023 · 3 comments
Closed

Memory issue when try to build customised model #326

CWYuan08 opened this issue Jan 10, 2023 · 3 comments

Comments

@CWYuan08
Copy link

Hi I encountered this error when trying bonito basecaller to build our own model:

RuntimeError: CUDA out of memory. Tried to allocate 1.95 GiB (GPU 0; 15.74 GiB total capacity; 2.37 GiB already allocated; 1.70 GiB free; 2.42 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I don't really understand this message, should I add max_split_size_mb to the command? Thank your very much!

Best,
CW

@CWYuan08
Copy link
Author

Hi I have changed export 'PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:100’ and export 'CUDA_LAUNCH_BLOCKING=1’, but I am still getting "RuntimeError: CUDA error: out of memory", do I need to change anything in the serialization.py file?

Thank you!

@CWYuan08
Copy link
Author

The GPU we are trying to run it on is an Nvidia A4000 with 16GB of VRAM.

@CWYuan08
Copy link
Author

This post: #247 solved my problem

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

2 participants