Error using rand function with gpu suport

4 visualizzazioni (ultimi 30 giorni)
papar22
papar22 il 2 Dic 2015
Risposto: Edric Ellis il 2 Dic 2015
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

Risposte (1)

Edric Ellis
Edric Ellis il 2 Dic 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".

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by