What's the proper way to handle GPU related matlab functions in a compiled app that might run on a computer without a supported GPU
조회 수: 3 (최근 30일)
이전 댓글 표시
Do I just somehow test and if all those statments declarations out or what or do functions like gpuArray do nothing when run on a computer without a supported GPU
댓글 수: 0
채택된 답변
Edric Ellis
2021년 7월 21일
You can use canUseGpu to check if a GPU is available. If one is not, then your code needs to not create any gpuArray data.
댓글 수: 2
Walter Roberson
2021년 7월 21일
I think in a situation like that, I would probably use a little wrapper function to do the allocations.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 GPU Computing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!