Support for NVlink with multi GPU

vinoth gurusamy · Apr 19, 2022 · 2.1K views
Question
I am new to GPU acceleration. I am currently using arrayfun on a 1080ti and running out of memory. I am planning to build a new workstation with 2X, RTX 6000 cards. will matlab support NVLINK to pool memory together or will I have to split the code to run on 2 threads on different GPUs.
Expert Answer
Profile picture of John Williams
John Williams PhD Expert
Answered Nov 20, 2025
MATLAB supports NVLink in Deep Learning applications (calling trainNetwork and similar) and explicitly through the GOP function. If you invoke GOP using the special syntax gop(..., 'gpuArray') then it will use whatever peer-to-peer communication is available between GPUs, which includes NVLink.
 
 
However, there is no 'general' support for distributed computation on multiple GPUs, akin to use of a distributed array. You can get desirable behaviour by implementing your own algorithms using a parallel pool and spmd.
 
 
Alternatively, if you have a non-communicating workflow (e.g. batch computation) then you can take advantage of both your GPUs with no need for direct sharing of data between them. Using parallel language concepts like parfor and parfeval is appropriate here.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!