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!