Code adaptation to use NVlink


Do I have to adapt the CUDA code to use NVlink?

In other words,
If I have CUDA code that working on 1 GPU and I add more GPUs that connected with NVlink, do I need to change my code?

Thank you,

Your code developed to use a single GPU won’t automatically use more than one GPU just because they are connected with NVLink. Yes, code changes are needed.

Thank you for your response,
where can I find tutorial that explain what I need to do ?

just search on multi-GPU

the cuda simple multi-GPU sample code