Set up Stateful Predict to not try and use GPU Functionality
2 次查看(过去 30 天)
显示 更早的评论
Although our group has a Paralell Computing Toolbox license it is not always available. This means when trying to use a stateful Predict simulink block I encounter an error that GPU functionality requires that toolbox. It is not apparent that there is a way to set it to use CPU for the predictions from the block function or from what I could find in the documentation.
0 个评论
回答(1 个)
Ruth
2024-5-23
The "Stateful Predict" block can call the "predict" function in MATLAB which uses the GPU by default. To avoid using the GPU in this case, you can hide the GPU from MATLAB entirely by either:
gpuDevice([]);
or executing this right after you start MATLAB:
setenv CUDA_VISIBLE_DEVICES -1
You can see more info on this at this post: https://uk.mathworks.com/matlabcentral/answers/1893345-disable-the-gpu
Best wishes,
Ruth
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deep Learning Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!