Parallelizing MATLAB code using many GPU cores
조회 수: 6 (최근 30일)
이전 댓글 표시
I have a MATLAB script that runs many independent iterations (for loop), of the form
for idx=1:N
result(idx) = some_procedure(data(idx));
end
I have a NVIDIA graphics card with over 3000 CUDA cores. Is it possible to parallelize the code, such that e.g. each GPU core handles one iteration? I understood that parfor is not the answer here but is there some equivalent?
댓글 수: 0
채택된 답변
Joss Knight
2018년 8월 31일
GPU cores do not work like CPU cores. They cannot run independent tasks.
댓글 수: 10
Joss Knight
2020년 4월 25일
You should look elsewhere for further performance improvements. MATLAB has no half datatype, and sparse only supports 2-D matrices so cannot be used for batch operations, not that it would be useful anyway since sparse only makes sense for large matrices.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing in MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!