Error using rand function with gpu suport
1 view (last 30 days)
Show older comments
Hi all together,
I am using rand function with gpu support as ( rand(size, type, 'gpuArray') ) with R2013a on the cluster. I receive the following error. "Error using rand Output class must be 'single' or 'double'." The point is that, when I run it locally on my machine, there is no error. The Matlab version of my machine is R2015b. It would be appreciated if someone let me know what the problem is? Is it related to matlab version or the property of the CUDA device on the server? Should I specify something to use the gpu in this case (ex. DriverVersion, ComputeCapability, etc)?
Any help would be appreciated. Bests
0 Comments
Answers (1)
Edric Ellis
on 2 Dec 2015
The ability to call rand(size, type, 'gpuArray') was added in R2014a. This is mentioned in the MATLAB release notes for 14a - see the item "Support array-creation functions in your class".
0 Comments
See Also
Categories
Find more on GPU Computing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!