Implementation of GPU computing with gpuArray?

조회 수: 7 (최근 30일)
Ivan
Ivan 2020년 10월 2일
답변: Walter Roberson 2020년 10월 2일
Hi!
I have a probplem with GPU computing.
I have implemented in my code and in all my functions (*m-files) GPU computing by adding gpuArray.
However, I did not observe significant improvment in computational time. Moreover, in my task maneger GPU is loaded only max 3%.
Can anyone advice what would be the best way to double check if my code really addresses the GPU? What could be a possible solution of this problem?
As a part of my code, I use the VideoWriter function to save frames of figures after every "for loop". Can it be a possible issue why the speed is not improved?
Thank you in advance for any help!
Best regards,
Ivan

답변 (1개)

Walter Roberson
Walter Roberson 2020년 10월 2일
Every iteration, you have to bring back the solution from the GPU and write it to video. Writing to video can involve some compression steps, depending on what kind of file you are writing and what kind of "profile" you are using. That processing could easily take a lot more time than the iterations take on the GPU.
Remember that there is overhead getting the data to and from the GPU and in instructing the GPU what to do. If the problem you are sending to the GPU is not "big enough" then you can even end up with worse performance than using CPU.

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by