fluid.CUDAPlace(0)报错
Created by: ipyffor
- 版本、环境信息: 1)PaddlePaddle版本:1.7.0 2)CPU:Itel(R)CreTM)i5- 8300HCPU @ 2.30GHz 2.30GHz 3)GPU:Nvidia GeForce GTX 1050 Ti,CUDA:10.0和CUDNN:7.6.5.32 4)系统环境:win10 1089企业版、、Python版本:3.7.4
- 安装方式信息:pip安装 运行工具Pycharm、Jupyter
-
错误1: 单独运行fluid.CUDAPlace(0)不报错,训练的时候运行报错,错误和错误2差不多
-
错误2:
import paddle.fluid paddle.fluid.install_check.run_check()
Running Verify Paddle Program ... --------------------------------------------------------------------------- EnforceNotMet Traceback (most recent call last) <ipython-input-12-cbaed7791b8d> in <module> 1 import paddle.fluid ----> 2 paddle.fluid.install_check.run_check() D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\install_check.py in run_check() 122 fetch_list=[out0.name, param_grads[1].name]) 123 --> 124 test_simple_exe() 125 126 print("Your Paddle works well on SINGLE GPU or CPU.") D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\install_check.py in test_simple_exe() 118 core.CUDAPlace(0) if core.is_compiled_with_cuda() and 119 (core.get_cuda_device_count() > 0) else core.CPUPlace()) --> 120 exe0.run(startup_prog) 121 exe0.run(feed={inp0.name: np_inp_single}, 122 fetch_list=[out0.name, param_grads[1].name]) D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\executor.py in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 781 warnings.warn( 782 "The following exception is not an EOF exception.") --> 783 six.reraise(*sys.exc_info()) 784 785 def _run_impl(self, program, feed, fetch_list, feed_var_name, D:\Program Files\Anaconda3\lib\site-packages\six.py in reraise(tp, value, tb) 691 if value.__traceback__ is not tb: 692 raise value.with_traceback(tb) --> 693 raise value 694 finally: 695 value = None D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\executor.py in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 776 scope=scope, 777 return_numpy=return_numpy, --> 778 use_program_cache=use_program_cache) 779 except Exception as e: 780 if not isinstance(e, core.EOFException): D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\executor.py in _run_impl(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 829 scope=scope, 830 return_numpy=return_numpy, --> 831 use_program_cache=use_program_cache) 832 833 program._compile(scope, self.place) D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\executor.py in _run_program(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) 903 if not use_program_cache: 904 self._default_executor.run(program.desc, scope, 0, True, True, --> 905 fetch_var_name) 906 else: 907 self._default_executor.run_prepared_ctx(ctx, scope, False, False, EnforceNotMet: -------------------------------------------- C++ Call Stacks (More useful to developers): -------------------------------------------- Windows not support stack backtrace yet. ------------------------------------------ Python Call Stacks (More useful to users): ------------------------------------------ File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\framework.py", line 2594, in _prepend_op attrs=kwargs.get("attrs", None)) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\initializer.py", line 191, in __call__ stop_gradient=True) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\framework.py", line 2476, in create_parameter initializer(param, self) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\layer_helper_base.py", line 353, in create_parameter **attr._to_kwargs(with_initializer=True)) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\dygraph\layers.py", line 113, in create_parameter default_initializer) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\dygraph\nn.py", line 921, in __init__ shape=[output_dim], attr=bias_attr, dtype=dtype, is_bias=True) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\install_check.py", line 38, in __init__ param_attr=ParamAttr(initializer=Constant(value=0.1))) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\install_check.py", line 112, in test_simple_exe simple_layer0 = SimpleLayer(input_size=2) File "D:\Program Files\Anaconda3\lib\site-packages\paddle\fluid\install_check.py", line 124, in run_check test_simple_exe() File "<ipython-input-12-cbaed7791b8d>", line 2, in <module> paddle.fluid.install_check.run_check() File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3249, in run_ast_nodes if (await self.run_code(code, result, async_=asy)): File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3058, in run_cell_async interactivity=interactivity, compiler=compiler, result=result) File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\async_helpers.py", line 68, in _pseudo_sync_runner coro.send(None) File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in _run_cell return runner(coro) File "D:\Program Files\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2855, in run_cell raw_cell, store_history, silent, shell_futures) File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\zmqshell.py", line 536, in run_cell return super(ZMQInteractiveShell, self).run_cell(*args, **kwargs) File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\ipkernel.py", line 294, in do_execute res = shell.run_cell(code, store_history=store_history, silent=silent) File "D:\Program Files\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 542, in execute_request user_expressions, allow_stdin, File "D:\Program Files\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 272, in dispatch_shell yield gen.maybe_future(handler(stream, idents, msg)) File "D:\Program Files\Anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper yielded = next(result) File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\kernelbase.py", line 365, in process_one yield gen.maybe_future(dispatch(*args)) File "D:\Program Files\Anaconda3\lib\site-packages\tornado\gen.py", line 748, in run yielded = self.gen.send(value) File "D:\Program Files\Anaconda3\lib\site-packages\tornado\gen.py", line 787, in inner self.run() File "D:\Program Files\Anaconda3\lib\site-packages\tornado\ioloop.py", line 743, in _run_callback ret = callback() File "D:\Program Files\Anaconda3\lib\site-packages\tornado\ioloop.py", line 690, in <lambda> lambda f: self._run_callback(functools.partial(callback, future)) File "D:\Program Files\Anaconda3\lib\asyncio\events.py", line 88, in _run self._context.run(self._callback, *self._args) File "D:\Program Files\Anaconda3\lib\asyncio\base_events.py", line 1771, in _run_once handle._run() File "D:\Program Files\Anaconda3\lib\asyncio\base_events.py", line 534, in run_forever self._run_once() File "D:\Program Files\Anaconda3\lib\site-packages\tornado\platform\asyncio.py", line 148, in start self.asyncio_loop.run_forever() File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel\kernelapp.py", line 563, in start self.io_loop.start() File "D:\Program Files\Anaconda3\lib\site-packages\traitlets\config\application.py", line 664, in launch_instance app.start() File "D:\Program Files\Anaconda3\lib\site-packages\ipykernel_launcher.py", line 16, in <module> app.launch_new_instance() File "D:\Program Files\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\Program Files\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) ---------------------- Error Message Summary: ---------------------- Error: Failed to create Cudnn handle in DeviceContext [Hint: CUDNN_STATUS_NOT_INITIALIZED] at (D:\1.7.0\paddle\paddle\fluid\platform\device_context.cc:283) [operator < fill_constant > error]