parfor images and gpu

조회 수: 5 (최근 30일)
michael scheinfeild
michael scheinfeild 2017년 1월 1일
답변: Joss Knight 2017년 1월 2일
i use the new options in loops
parfor
some code,,,
someimage=gpuarray(image)
process(someimage)
end
1) it slows down pc 2) it takes all memory 3) somtimes it works slower than normal loop and image in cpu
so when it is usful to use parfor (images i suppose transmited all fors if it is array) and gpu not alwayes fast is it the communication gpu cpu that takes the time?

채택된 답변

Joss Knight
Joss Knight 2017년 1월 2일
You've only got one GPU so it's rarely faster to run anything on it in a parallel pool. Doing so is just an elaborate way of running the computation serially but with greater overhead and less memory.
Get a second GPU, and you'll see an improvement.

추가 답변 (0개)

카테고리

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