Skip to content

Instantly share code, notes, and snippets.

@MartinThoma
Created July 2, 2015 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MartinThoma/0636925c866cbe9cfd0f to your computer and use it in GitHub Desktop.
Save MartinThoma/0636925c866cbe9cfd0f to your computer and use it in GitHub Desktop.
Lasagne error cuDNN
lasagne/tests/test_nonlinearities.py::TestNonlinearities::test_nonlinearity[softmax] FAILED
========================================================================= FAILURES ==========================================================================
_______________________________________________________ TestNonlinearities.test_nonlinearity[softmax] _______________________________________________________
self = <test_nonlinearities.TestNonlinearities object at 0x7f7fba3b0850>, nonlinearity = 'softmax'
@pytest.mark.parametrize('nonlinearity',
['linear', 'rectify',
'leaky_rectify', 'sigmoid',
'tanh', 'softmax',
'leaky_rectify_0'])
def test_nonlinearity(self, nonlinearity):
import lasagne.nonlinearities
if nonlinearity == 'leaky_rectify_0':
from lasagne.nonlinearities import LeakyRectify
theano_nonlinearity = LeakyRectify(leakiness=0)
else:
theano_nonlinearity = getattr(lasagne.nonlinearities,
nonlinearity)
np_nonlinearity = getattr(self, nonlinearity)
X = T.matrix()
X0 = lasagne.utils.floatX(np.random.uniform(-3, 3, (10, 10)))
> theano_result = theano_nonlinearity(X).eval({X: X0})
lasagne/tests/test_nonlinearities.py:47:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/lib/python2.7/dist-packages/theano/gof/graph.py:412: in eval
self._fn_cache[inputs] = theano.function(inputs, self)
/usr/local/lib/python2.7/dist-packages/theano/compile/function.py:266: in function
profile=profile)
/usr/local/lib/python2.7/dist-packages/theano/compile/pfunc.py:511: in pfunc
on_unused_input=on_unused_input)
/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py:1466: in orig_function
defaults)
/usr/local/lib/python2.7/dist-packages/theano/compile/function_module.py:1324: in create
input_storage=input_storage_lists)
/usr/local/lib/python2.7/dist-packages/theano/gof/link.py:519: in make_thunk
output_storage=output_storage)[:3]
/usr/local/lib/python2.7/dist-packages/theano/gof/vm.py:897: in make_all
no_recycling))
/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/__init__.py:259: in make_thunk
compute_map, no_recycling)
/usr/local/lib/python2.7/dist-packages/theano/gof/op.py:739: in make_thunk
output_storage=node_output_storage)
/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py:1073: in make_thunk
keep_lock=keep_lock)
/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py:1015: in __compile__
keep_lock=keep_lock)
/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py:1442: in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py:1076: in module_from_key
module = lnk.compile_cmodule(location)
/usr/local/lib/python2.7/dist-packages/theano/gof/cc.py:1354: in compile_cmodule
preargs=preargs)
/usr/local/lib/python2.7/dist-packages/theano/sandbox/cuda/nvcc_compiler.py:434: in compile_str
return dlimport(lib_filename)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
fullpath = '/home/moose/.theano/compiledir_Linux-3.13--generic-x86_64-with-LinuxMint-17-qiana-x86_64-2.7.6-64/tmpMu3t3a/098256bac448c469f1a96db85c827ba5.so'
suffix = '.so'
def dlimport(fullpath, suffix=None):
"""Dynamically load a .so, .pyd, .dll, or .py file
:type fullpath: string
:param fullpath: a fully-qualified path do a compiled python module
:param suffix: a suffix to strip from the end of fullpath to get the
import name
:type suffix: string
:returns: the dynamically loaded module (from __import__)
"""
if not os.path.isabs(fullpath):
raise ValueError('`fullpath` must be an absolute path', fullpath)
if suffix is None:
if fullpath.endswith('.so'):
suffix = '.so'
elif fullpath.endswith('.pyd'):
suffix = '.pyd'
elif fullpath.endswith('.dll'):
suffix = '.dll'
elif fullpath.endswith('.py'):
suffix = '.py'
else:
suffix = ''
rval = None
if fullpath.endswith(suffix):
module_name = '.'.join(fullpath.split(os.path.sep)[-2:])[:-len(suffix)]
else:
raise ValueError('path has wrong suffix', (fullpath, suffix))
workdir = fullpath[:-len(module_name) - 1 - len(suffix)]
_logger.debug("WORKDIR %s", workdir)
_logger.debug("module_name %s", module_name)
sys.path[0:0] = [workdir] # insert workdir at beginning (temporarily)
global import_time
try:
if importlib is not None:
if hasattr(importlib, "invalidate_caches"):
importlib.invalidate_caches()
t0 = time.time()
> rval = __import__(module_name, {}, {}, [module_name])
E RuntimeError: ('The following error happened while compiling the node', GpuDnnSoftmax{tensor_format='bc01', mode='channel', algo='accurate'}(GpuContiguous.0), '\n', 'could not create cuDNN handle: CUDNN_STATUS_NOT_INITIALIZED', "[GpuDnnSoftmax{tensor_format='bc01', mode='channel', algo='accurate'}(<CudaNdarrayType(float32, (False, False, True, True))>)]")
/usr/local/lib/python2.7/dist-packages/theano/gof/cmodule.py:293: RuntimeError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment