You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C:\Users\resuly\Desktop>python cpu_gpu_test.py
Can not use cuDNN on context None: Disabled by dnn.enabled flag
Preallocating 1638/2048 Mb (0.800000) on cuda0
Mapped name None to device cuda0: GeForce GTX 960M (0000:01:00.0)
[GpuElemwise{exp,no_inplace}(<GpuArrayType<None>(float32, (False,))>), HostFromGpu(gpuarray)(GpuElemwise{exp,no_inplace}.0)]
Looping 1000 times took 0.274695 seconds
Result is [ 1.23178029 1.61879349 1.52278066 ..., 2.20771813 2.29967761
1.62323296]
Used the gpu
However, it showed me a memory error when I used GPU with CUDA. ( pygpu is 0.6.9 version )
set THEANO_FLAGS=%THEANO_FLAGS_GPU_DNN%
C:\Users\resuly\Desktop>python cpu_gpu_test.py
Using cuDNN version 5110 on context None
WARNING: Preallocating too much memory can prevent cudnn and cublas from working properly
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 164, in <module>
use(config.device)
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 151, in use
init_dev(device)
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 90, in init_dev
pygpu.empty((gmem,), dtype='int8', context=context)
File "pygpu\gpuarray.pyx", line 749, in pygpu.gpuarray.empty
File "pygpu\gpuarray.pyx", line 676, in pygpu.gpuarray.pygpu_empty
File "pygpu\gpuarray.pyx", line 290, in pygpu.gpuarray.array_empty
pygpu.gpuarray.GpuArrayException: b'cuMemAlloc: CUDA_ERROR_OUT_OF_MEMORY: out of memory'
[Elemwise{exp,no_inplace}(<TensorType(float32, vector)>)]
I don't think this is a real memory problem because THEANO_FLAGS_GPU works fine with the same script.
My environment variables:
When I changed the pygpu back to 0.6.2 version. It shows:
C:\Users\resuly\Desktop>python cpu_gpu_test.py
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 164, in <module>
use(config.device)
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 151, in use
init_dev(device)
File "D:\Anaconda3\lib\site-packages\theano\gpuarray\__init__.py", line 60, in init_dev
sched=config.gpuarray.sched)
File "pygpu\gpuarray.pyx", line 614, in pygpu.gpuarray.init (pygpu/gpuarray.c:9415)
File "pygpu\gpuarray.pyx", line 566, in pygpu.gpuarray.pygpu_init (pygpu/gpuarray.c:9106)
File "pygpu\gpuarray.pyx", line 1021, in pygpu.gpuarray.GpuContext.__cinit__ (pygpu/gpuarray.c:13468)
pygpu.gpuarray.GpuArrayException: Error loading library: 0
[Elemwise{exp,no_inplace}(<TensorType(float32, vector)>)]
BTW, tensorflow-gpu works well with CUDA. I don't know how to solve this problem.
The text was updated successfully, but these errors were encountered:
Do you specifically need the Theano backend? If not, I would recommend to just switch to the tensorflow backend in the meantime, as it seems to work better and in my experience faster as well.
As for the Theano flags, have you tried different values for the prealloc-flag? E.g. 0.7 or 0.6?
It works fine with THEANO_FLAGS_GPU:
However, it showed me a memory error when I used GPU with CUDA. ( pygpu is 0.6.9 version )
I don't think this is a real memory problem because THEANO_FLAGS_GPU works fine with the same script.
My environment variables:
When I changed the pygpu back to 0.6.2 version. It shows:
BTW, tensorflow-gpu works well with CUDA. I don't know how to solve this problem.
The text was updated successfully, but these errors were encountered: