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

About CUDA out of memory #29

Open
ccy-ustb opened this issue Jun 8, 2023 · 1 comment
Open

About CUDA out of memory #29

ccy-ustb opened this issue Jun 8, 2023 · 1 comment

Comments

@ccy-ustb
Copy link

ccy-ustb commented Jun 8, 2023

Hello, when I build a line map on a dataset with over 1000 images, it will appear:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 938.00 MiB (GPU 0; 5.77 GiB total capacity; 1.07 GiB already allocated; 879.31 MiB free; 3.09 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
So, I would like to inquire if it is possible to change certain parameters to accommodate small memory GPUs?

@B1ueber2y
Copy link
Member

Hi! If the GPU memory is really small, you may resize the images to smaller size by changing the parameter "--max_image_size", whose default is 1600 here: https://github.com/cvg/limap/blob/main/cfgs/triangulation/default.yaml#L15. However, this will result in degraded performance.

In the implementation only one image is inferred at each time (we disable parallelization by default at feature extraction and matching) so there is unfortunately nothing to do to reduce memory requirements without degrading the performance if it exceeds the memory limit of your GPU.

Thanks a lot!

zhangshaos pushed a commit to zhangshaos/limap that referenced this issue Jul 12, 2023
…s of pytorch with CUDA (cvg#29)

* Add OpenCV as dependency and pytorch-CUDA compatible reference link to README

* update readme.

* update readme.

* update readme.

* update tp-lsd installation in readme.

* minor update.

* fix tp-lsd link.

Co-authored-by: B1ueber2y <[email protected]>
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