Bugfix: spaces in temp path prevents cudnn init
When initializing theano with cudnn, _try_compile_tmp is eventually run to verify compiling a test program with gcc. This function requests a temporary path for the test program from tempfile.py. Rarely, tempfile.py can return a path that has spaces in it. If this happens, gcc cannot parse it correctly and throws an error. This change prevents the issue by wrapping the temporary path in quotes.
For an example case: I was running python through an ssh client which accesses the home directory through a symlink in C:\Program Files\openssh\. Tempfile.py defaulted to the working directory and returned the path including the space in "Program Files", which crashed gcc.
正在显示
请
注册
或者
登录
后发表评论