Can Simulink Models Be Ran On A GPU?

5 ビュー (過去 30 日間)
Aaron Kurlantzick
Aaron Kurlantzick 2021 年 3 月 1 日
コメント済み: TAHAR NOUAOUI 2024 年 1 月 15 日
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
Anshika Chaurasia 2021 年 3 月 4 日
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!
  1 件のコメント
TAHAR NOUAOUI
TAHAR NOUAOUI 2024 年 1 月 15 日
hello
is it possible to run a simulation on a gpu now?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet 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