Azzera filtri
Azzera filtri

Can Simulink Models Be Ran On A GPU?

6 visualizzazioni (ultimi 30 giorni)
I'm part of a group trying to speed up our code. We send out inputs to the simulink model with
simIn(i) = simIn(i).setVariable('Amplitude', pops(i, 1));
simIn(i) = simIn(i).setVariable('Freq', pops(i, 2));
simIn(i) = simIn(i).setVariable('PW', pops(i, 3));
simIn(i) = simIn(i).setVariable('Ramp_Toggle', pops(i, 4));
simIn(i) = simIn(i).setVariable('Ramp_Slope', pops(i, 5));
simIn(i) = simIn(i).setVariable('Ramp_Flat', pops(i, 6));
simIn(i) = simIn(i).setVariable('Intraburst_Toggle', pops(i, 7));
simIn(i) = simIn(i).setVariable('Intraburst_Period', pops(i, 8));
simIn(i) = simIn(i).setVariable('Intraburst_Packet', pops(i, 9));
simIn(i) = simIn(i).setVariable('Phasic', pops(i, 10));
and take back outputs with
simOut = parsim(simIn, 'ShowSimulationManager', 'off');
Using tic toc it seems that the simulink model takes about 90% of our runtime. Is there a way to run this on the GPU or other ways to speed it up? Any help will be greatly appreciated.
Thank you

Risposta accettata

Anshika Chaurasia
Anshika Chaurasia il 4 Mar 2021
Hi,
You can use GPU Coder to speed up the execution of your Simulink model by using NVIDIA GPUs:
Please note that not all functions are supported by GPU Coder.
It is currently not possible to run a simulation on a GPU. The developers are aware of this enhancement request and might add this feature in a future release.
Hope it helps!

Più risposte (0)

Categorie

Scopri di più su Get Started with GPU Coder in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by