忽略警告:无法加载cuDNN DSO,影响fft计算?

时间:2017-01-18 13:29:40

标签: python tensorflow

最近安装了GPU版本的tensorflow 0.12.1并使用python 3.5.2 for windows。

我曾经使用tensorflow cpu版本,我没有得到这些警告其他数学计算。 FFT在cpu版本中不起作用

x = tf.Variable([1+0j,2+0j,3+0j,4+0j,5+0j],dtype=tf.complex64)
k = tf.initialize_all_variables()

sess= tf.Session()
sess.run(k)
print(sess.run(tf.fft(x)))

正如在其他线程中建议我改为gpu版本。我曾经得到其他功能的警告,但现在当我使用fft我得到这个错误任何人如何解决它?我不明白错误。

C:\Users\raady\AppData\Local\Programs\Python\Python35\python.exe "D:/Lab Project Files/TF/Practice Files/test.py"
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cublas64_80.dll locally
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:119] Couldn't open CUDA library cudnn64_5.dll
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_dnn.cc:3459] Unable to load cuDNN DSO
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library cufft64_80.dll locally
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library nvcuda.dll locally
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\dso_loader.cc:128] successfully opened CUDA library curand64_80.dll locally
WARNING:tensorflow:From D:/Lab Project Files/TF/Practice Files/test.py:4 in <module>.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
Instructions for updating:
Use `tf.global_variables_initializer` instead.
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:885]Found device 0 with properties: 
name: GeForce GTX 660
major: 3 minor: 0 memoryClockRate (GHz) 1.0325
pciBusID 0000:01:00.0
Total memory: 2.00GiB
Free memory: 1.65GiB
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:906]DMA: 0 
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:916] 0:   Y 
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 660, pci bus id: 0000:01:00.0)
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_fft.cc:169] failed to create cuFFT batched plan:2
c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\stream_executor\cuda\cuda_fft.cc:111] failed to run cuFFT routine cufftSetStream: 1
Traceback (most recent call last):
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1021, in _do_call
return fn(*args)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1003, in _run_fn
status, run_metadata)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\contextlib.py", line 66, in __exit__
next(self.gen)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 469, in raise_exception_on_not_ok_status pywrap_tensorflow.TF_GetCode(status))
tensorflow.python.framework.errors_impl.InternalError: c2c fft failed : in.shape=[5]
 [[Node: FFT = FFT[_device="/job:localhost/replica:0/task:0/gpu:0"](Variable/read/_5)]]
 [[Node: FFT/_7 = _Recv[client_terminated=false,  recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_7_FFT", tensor_type=DT_COMPLEX64, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/Lab Project Files/TF/Practice Files/test.py", line 8, in <module>
print(sess.run(tf.fft(x)))
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 766, in run
run_metadata_ptr)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 964, in _run
feed_dict_string, options, run_metadata)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1014, in _do_run
target_list, options, run_metadata)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\client\session.py", line 1034, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InternalError: c2c fft failed : in.shape=[5]
 [[Node: FFT = FFT[_device="/job:localhost/replica:0/task:0/gpu:0"](Variable/read/_5)]]
 [[Node: FFT/_7 = _Recv[client_terminated=false,    recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1,   tensor_name="edge_7_FFT", tensor_type=DT_COMPLEX64, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

Caused by op 'FFT', defined at:
File "D:/Lab Project Files/TF/Practice Files/test.py", line 8, in <module>
print(sess.run(tf.fft(x)))
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 800, in fft
result = _op_def_lib.apply_op("FFT", input=input, name=name)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 759, in apply_op
op_def=op_def)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 2240, in create_op
original_op=self._default_original_op, op_def=op_def)
File "C:\Users\raady\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\framework\ops.py", line 1128, in __init__
self._traceback = _extract_stack()

InternalError (see above for traceback): c2c fft failed : in.shape=[5]
 [[Node: FFT = FFT[_device="/job:localhost/replica:0/task:0/gpu:0"](Variable/read/_5)]]
 [[Node: FFT/_7 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/cpu:0", send_device="/job:localhost/replica:0/task:0/gpu:0", send_device_incarnation=1, tensor_name="edge_7_FFT", tensor_type=DT_COMPLEX64, _device="/job:localhost/replica:0/task:0/cpu:0"]()]]

1 个答案:

答案 0 :(得分:0)

您需要将与dll关联的cudnn复制到作为PATH环境变量元素的文件夹中。由于您正在查找其他CUDA库,因此只需将cudnn64_v5.dll复制到包含其他CUDA库的目录。