nagadomi / waifu2x

Image Super-Resolution for Anime-Style Art
http://waifu2x.udp.jp/
MIT License
27.4k stars 2.71k forks source link

Use Shared GPU Memory instead of Dedicated GPU Memory #267

Open GovetaXV opened 5 years ago

GovetaXV commented 5 years ago

Hi! I wanted to ask if there was a way to utilize the shared GPU memory instead of the dedicated one. Even though it is a little slower, There is a lot more of it.

nagadomi commented 5 years ago

(I may not understand what are you asking about.) I do not know whether there is shared memory for GPUs. In training process, you can use NVIDIA NCCL (NVIDIA Collective Communications Library) for multi-GPUs, if you installed NVIDIA NCCL and my modified version of nccl.torch.

nagadomi commented 5 years ago

If you got GPU out of memory error, you can avoid it with -crop_size option (e.g. -crop_size 128).

78Alpha commented 4 years ago

It is the shared memory windows allocates to a gpu in the event you run out of VRAM during a game. In gaming the driver handles this by dumping VRAM contents into RAM. CUDA supports this with shared memory, or unified memory, something like that, but it requires explicit programming to do so.