reading saved gpuArray data with a non-gpu computer
Show older comments
After some lengthy calculations using gpus in Matlab (2015b, cuda7), I have saves .mat files that have variables of class gpuArray. I wanted to further analyze them with my non gpu laptop and was underthe impression that a simple gather would work, but I was wrong. I get the following error:
>> gather(x)
Error using gpuArray/gather
Attempting to access the property or method of an invalid object.
I know I can first gather(x) and then save, I wanted to know how would one access data of class gpuArray that is saved in a mat file without have a gpu present?
Accepted Answer
More Answers (1)
Alison Eele
on 19 Sep 2019
2 votes
This is now possible from R2019b.
"You can load MAT files containing gpuArray data as in-memory arrays when a GPU is not available. A gpuArray loaded without a GPU is limited and you cannot use it for computations. To use a gpuArray loaded without a GPU, retrieve the contents using gather."
Categories
Find more on GPU Computing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!