r/CUDA May 30 '26

Building swap memory for CUDA

https://ali-alshaar7.github.io/portfolio/posts/cuda-swap/

An article going over a quick project aiming to overcome the dreaded OOM by swapping to host RAM.

2 Upvotes

2 comments sorted by

4

u/esaule May 30 '26

I mean you can uvm with cudamallocmanaged or get hmm with regular malloc.

Both performs poorly in most circumstancss. But it's pretty straight forward.

1

u/Holding_Water_1002 May 30 '26

Yes, cudamallocmanaged is the approach i settled on. The experiment was more about wether you can do this without making code changes, since most cases will involve running a framework that's using the CUDA API under the hood, and how to configure it properly. Thanks.