Skip to content

Instantly share code, notes, and snippets.

@benanne
Created September 24, 2014 13:59
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 benanne/34176e4d1abd56933bbf to your computer and use it in GitHub Desktop.
Save benanne/34176e4d1abd56933bbf to your computer and use it in GitHub Desktop.
Theano error CUDA 6.5 + GeForce GTX 480
In [1]: import theano
iUsing gpu device 0: GeForce GTX 480
m
In [2]: import theano.tensor as T
In [3]: x, y = T.matrices('x', 'y')
In [4]: prod = T.dot(x, y)
In [5]: f = theano.function([x,y], prod)
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-5-97cadd11cdb4> in <module>()
----> 1 f = theano.function([x,y], prod)
/home/sedielem/python_modules/theano/compile/function.pyc in function(inputs, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input)
263 allow_input_downcast=allow_input_downcast,
264 on_unused_input=on_unused_input,
--> 265 profile=profile)
266 # We need to add the flag check_aliased inputs if we have any mutable or
267 # borrowed used defined inputs
/home/sedielem/python_modules/theano/compile/pfunc.pyc in pfunc(params, outputs, mode, updates, givens, no_default_updates, accept_inplace, name, rebuild_strict, allow_input_downcast, profile, on_unused_input)
509 return orig_function(inputs, cloned_outputs, mode,
510 accept_inplace=accept_inplace, name=name, profile=profile,
--> 511 on_unused_input=on_unused_input)
512
513
/home/sedielem/python_modules/theano/compile/function_module.pyc in orig_function(inputs, outputs, mode, accept_inplace, name, profile, on_unused_input)
1330 profile=profile,
1331 on_unused_input=on_unused_input).create(
-> 1332 defaults)
1333
1334 t2 = time.time()
/home/sedielem/python_modules/theano/compile/function_module.pyc in create(self, input_storage, trustme)
1196 # Get a function instance
1197 start_linker = time.time()
-> 1198 _fn, _i, _o = self.linker.make_thunk(input_storage=input_storage_lists)
1199 end_linker = time.time()
1200
/home/sedielem/python_modules/theano/gof/link.pyc in make_thunk(self, profiler, input_storage, output_storage)
487 return self.make_all(profiler=profiler,
488 input_storage=input_storage,
--> 489 output_storage=output_storage)[:3]
490
491 def make_all(self, profiler, input_storage, output_storage):
/home/sedielem/python_modules/theano/gof/vm.pyc in make_all(self, profiler, input_storage, output_storage)
889 storage_map,
890 compute_map,
--> 891 no_recycling))
892 if not hasattr(thunks[-1], 'lazy'):
893 # We don't want all ops maker to think about lazy Ops.
/home/sedielem/python_modules/theano/sandbox/cuda/__init__.pyc in make_thunk(self, node, storage_map, compute_map, no_recycling)
235 enable_cuda=False)
236 return super(GpuOp, self).make_thunk(node, storage_map,
--> 237 compute_map, no_recycling)
238
239 theano.compile.debugmode.default_make_thunk.append(
/home/sedielem/python_modules/theano/gof/op.pyc in make_thunk(self, node, storage_map, compute_map, no_recycling)
722 logger.debug('Trying CLinker.make_thunk')
723 outputs = cl.make_thunk(input_storage=node_input_storage,
--> 724 output_storage=node_output_storage)
725 fill_storage, node_input_filters, node_output_filters = outputs
726
/home/sedielem/python_modules/theano/gof/cc.pyc in make_thunk(self, input_storage, output_storage, keep_lock)
1022 cthunk, in_storage, out_storage, error_storage = self.__compile__(
1023 input_storage, output_storage,
-> 1024 keep_lock=keep_lock)
1025
1026 res = _CThunk(cthunk, init_tasks, tasks, error_storage)
/home/sedielem/python_modules/theano/gof/cc.pyc in __compile__(self, input_storage, output_storage, keep_lock)
964 input_storage,
965 output_storage,
--> 966 keep_lock=keep_lock)
967 return (thunk,
968 [link.Container(input, storage) for input, storage in
/home/sedielem/python_modules/theano/gof/cc.pyc in cthunk_factory(self, error_storage, in_storage, out_storage, keep_lock)
1402 else:
1403 module = get_module_cache().module_from_key(
-> 1404 key=key, fn=self.compile_cmodule_by_step, keep_lock=keep_lock)
1405
1406 vars = self.inputs + self.outputs + self.orphans
/home/sedielem/python_modules/theano/gof/cmodule.pyc in module_from_key(self, key, fn, keep_lock, key_data)
1004 # The module should be returned by the last
1005 # step of the compilation.
-> 1006 module = next(compile_steps)
1007 except StopIteration:
1008 break
/home/sedielem/python_modules/theano/gof/cc.pyc in compile_cmodule_by_step(self, location)
1317 lib_dirs=self.lib_dirs(),
1318 libs=libs,
-> 1319 preargs=preargs)
1320 except Exception, e:
1321 e.args += (str(self.fgraph),)
/home/sedielem/python_modules/theano/sandbox/cuda/nvcc_compiler.pyc in compile_str(module_name, src_code, location, include_dirs, lib_dirs, libs, preargs, rpaths, py_module)
429 #touch the __init__ file
430 open(os.path.join(location, "__init__.py"), 'w').close()
--> 431 return dlimport(lib_filename)
/home/sedielem/python_modules/theano/gof/cmodule.pyc in dlimport(fullpath, suffix)
288 if hasattr(importlib, "invalidate_caches"):
289 importlib.invalidate_caches()
--> 290 rval = __import__(module_name, {}, {}, [module_name])
291 if not rval:
292 raise Exception('__import__ failed', fullpath)
ImportError: ('The following error happened while compiling the node', GpuFromHost(y), '\n', '/home/sedielem/.theano/compiledir_Linux-3.13.0-24-generic-x86_64-with-Ubuntu-14.04-trusty-x86_64-2.7.6-64/tmpWUTcrw/68e868b4dd3209b43f86908b7d067d55.so: undefined symbol: _Z25CudaNdarray_CopyFromArrayP11CudaNdarrayP16tagPyArrayObject', '[GpuFromHost(y)]')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment