Can Simulink Models Be Ran On A GPU?

5 次查看(过去 30 天)
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

采纳的回答

Anshika Chaurasia
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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with GPU Coder 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by