are there GPU settings in matlab?

16 ビュー (過去 30 日間)
steve solomon
steve solomon 2020 年 6 月 27 日
コメント済み: steve solomon 2020 年 7 月 1 日
I just bought a new NVIDIA Titan RTX in the hopes of increasing the speed of some code but have been most disappointed in the results. It was actually slower than the same code (on a different machine) with a NVidia RTX 2080 Qmax. Are there Matlab setttings that can help me take mroe advantage of my new GPU?
  4 件のコメント
Walter Roberson
Walter Roberson 2020 年 6 月 28 日
Odd... the specifications I find on that device imply it should be about twice as fast as the RTX 2080 Max-Q for double precision, and a bit faster (about 3%) as the Max-Q for single precision.
steve solomon
steve solomon 2020 年 6 月 28 日
yup, and at $2500 it trancends odd and crosses over to annoying. dowloaded and ran GPUbench on both machines using same version of Matlab (2020a) and found the Titan faster as expected. so it must be my code but that's pretty simple and should show the expected improvement, hence my question.

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

採用された回答

Jason Ross
Jason Ross 2020 年 7 月 1 日
編集済み: Jason Ross 2020 年 7 月 1 日
For a Titan board, you have the option of putting it in "compute only" (TCC) mode, which frees it from the Windows GUI timeout. These are nVidia settings, not MATLAB settings, we just pick up the GPU and use it. This has helped with performance in some instances. Keep in mind that for the Turing architecture, it's going to favor singles math performance over doubles. TCC mode cannot be set for every nvidia card, but nvidia-smi will till you if it's not supported. Generally it's allowed for Titan, Tesla, and some Quadro cards.
To set it to compute only you can use the nvidia-smi command run in an elevated (Administrator) command prompt. You must also not have a monitor connected to the card. The command will look something like
"C:\Program Files\Nvidia corporation\nvsmi\nvidia-smi.exe" -i 2 -dm 1
where "-i" is the index of the Titan RTX card. You can find this by just running nvidia-smi.exe without any options:
"C:\Program Files\Nvidia corporation\nvsmi\nvidia-smi.exe"
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 7 月 1 日
Good point, I tend to forget about that.
steve solomon
steve solomon 2020 年 7 月 1 日
thanks Jason, that sounds very promising. the Titan board i have does support TCC mode but i can't put it into TCC mode while it's driving the display and since i don't have a second card, can't try this mode at the moment.

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

その他の回答 (1 件)

Sindar
Sindar 2020 年 6 月 28 日
Most code will not be run on the GPU without adjustment
There are guides here and it looks pretty easy for many applications: https://www.mathworks.com/solutions/gpu-computing.html

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by