reading saved gpuArray data with a non-gpu computer
9 ビュー (過去 30 日間)
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:
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?
Joss Knight 2015 年 12 月 23 日
Unfortunately, this is not possible. To make data visible to a MATLAB that does not have Parallel Computing Toolbox, you must first gather it before calling save. Without PCT, MATLAB does not know how to construct a gpuArray from the saved data, hence the error you are seeing. With PCT but with no GPU device you will see a different error.
その他の回答 (1 件)
Alison Eele 2019 年 9 月 19 日
This is now possible from R2019b.
To quote from the gpuArray documentation:
"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."