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

cuda out of memory #305

Open
yuling999666 opened this issue Jan 4, 2025 · 11 comments
Open

cuda out of memory #305

yuling999666 opened this issue Jan 4, 2025 · 11 comments

Comments

@yuling999666
Copy link

Hi @YifanLu2000, when you run spateo for lymph nodes, did you write codes to solve the problem of CUDA out of memory? It stuck on 50% progress on my server. It would be nice if you can give some suggestions. Thanks.

@YifanLu2000
Copy link
Contributor

Hi @yuling999666, I’d like to know the size of your GPU memory and the number of spots/cells in your dataset. You can refer to this tutorial to reduce GPU memory usage: Improve efficiency and scalability.

@yuling999666
Copy link
Author

Hi @yuling999666, I’d like to know the size of your GPU memory and the number of spots/cells in your dataset. You can refer to this tutorial to reduce GPU memory usage: Improve efficiency and scalability.

Hi @YifanLu2000 , thanks for your reply. Our GPU server installed a Nvidia A6000 48GB graphic card there. It also has 256 GB RAM. I have tried the tutorial of sparse computation, CUDA still out of memory. The lymph nodes have spots number about 50k-80k each slice. Thank you for your time.

@YifanLu2000
Copy link
Contributor

Hi @yuling999666, did you try using the sparse calculation?

@yuling999666
Copy link
Author

Hi @YifanLu2000, Thank you for the reply. I tried but it still out of memory. It seems that only downsampling works out right now.

@YifanLu2000
Copy link
Contributor

Hi @yuling999666, when performing alignment, are you using the entire transcriptome (e.g., 20k features)? Using too many gene expression features can significantly increase GPU memory usage. If this is the case, you might want to try using HVG (highly variable genes) or PCA features instead.

@yuling999666
Copy link
Author

Hi @YifanLu2000 , thank you for your reply. Yes, I used the entire transcriptome. I will try to use PCA/HVG instead. One more question for Figure 3A in paper. Did you provide colormap for plotting this figure in your material? I have checked GitHub of spateo-notebooks, but I didn't find it. I think you guys did great work and it's a nice visualization. If you didn't provide in the material, could you give me the color map for plotting Hemibrain data? Thanks!

@YifanLu2000
Copy link
Contributor

Hi @yuling999666, I use "Spectral" colormap for the Hemibrain data:

pc, _ = st.tdr.construct_pc(adata=adata, spatial_key=spatial_key, groupby='cell_type', key_added="tissue", colormap='Spectral',)

@yuling999666
Copy link
Author

Hi @YifanLu2000. Got you. Thank you! I appreciate it.

@yuling999666
Copy link
Author

Hi @YifanLu2000 , thank you for providing the colormap. Did you provide the colormap for Lymph nodes instead of Hemibrain? I have used the colormap but it is quite different from the plot in figure 3A for Hemibrain. I think the colormap is very close to figure 3B. Could you check? Thank you for your time and consideration.

@YifanLu2000
Copy link
Contributor

Hi @yuling999666, I have confirmed that I am using the Spectral colormap for Hemibrain, and also the same for Lymph nodes. You may check if the annotation is the same.

Image

@yuling999666
Copy link
Author

Hi @YifanLu2000, thank you for providing annotation. I will check. I appreciate it!

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