---------------------------------------------------------------------------
CudaAPIError Traceback (most recent call last)
<ipython-input-8-ce4d6e0bd497> in <module>()
----> 1 get_ipython().magic(u'time generator.fit(data)')
/home/chiroptera/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in magic(self, arg_s)
2305 magic_name, _, magic_arg_s = arg_s.partition(' ')
2306 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2307 return self.run_line_magic(magic_name, magic_arg_s)
2308
2309 #-------------------------------------------------------------------------
/home/chiroptera/anaconda/lib/python2.7/site-packages/IPython/core/interactiveshell.pyc in run_line_magic(self, magic_name, line)
2226 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2227 with self.builtin_trap:
-> 2228 result = fn(*args,**kwargs)
2229 return result
2230
/home/chiroptera/anaconda/lib/python2.7/site-packages/IPython/core/magics/execution.pyc in time(self, line, cell, local_ns)
/home/chiroptera/anaconda/lib/python2.7/site-packages/IPython/core/magic.pyc in <lambda>(f, *a, **k)
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
194
195 if callable(arg):
/home/chiroptera/anaconda/lib/python2.7/site-packages/IPython/core/magics/execution.pyc in time(self, line, cell, local_ns)
1160 if mode=='eval':
1161 st = clock2()
-> 1162 out = eval(code, glob, local_ns)
1163 end = clock2()
1164 else:
<timed eval> in <module>()
/home/chiroptera/workspace/QCThesis/MyML/cluster/K_Means3.pyc in fit(self, data)
107 while not stopcond:
108 # compute labels
--> 109 labels = self._label(data,self.centroids)
110
111 self.iters_ += 1 #increment iteration counter
/home/chiroptera/workspace/QCThesis/MyML/cluster/K_Means3.pyc in _label(self, data, centroids)
178 # we need array for distances to check convergence
179 if self._mode == "cuda":
--> 180 labels = self._cu_label(data, centroids)
181 elif self._mode == "special": #for tests only
182 labels=np.empty(self.N, dtype=np.int32)
/home/chiroptera/workspace/QCThesis/MyML/cluster/K_Means3.pyc in _cu_label(self, data, centroids)
426
427 # copy labels from device to host
--> 428 dLabels.copy_to_host(ary = labels)
429 # copy distance to centroids from device to host
430 dists = dDists.copy_to_host()
/home/chiroptera/anaconda/lib/python2.7/site-packages/numba/cuda/cudadrv/devicearray.pyc in copy_to_host(self, ary, stream)
193 assert self.alloc_size >= 0, "Negative memory size"
194 if self.alloc_size != 0:
--> 195 _driver.device_to_host(hostary, self, self.alloc_size, stream=stream)
196
197 if ary is None:
/home/chiroptera/anaconda/lib/python2.7/site-packages/numba/cuda/cudadrv/driver.pyc in device_to_host(dst, src, size, stream)
1377 fn = driver.cuMemcpyDtoH
1378
-> 1379 fn(host_pointer(dst), device_pointer(src), size, *varargs)
1380
1381
/home/chiroptera/anaconda/lib/python2.7/site-packages/numba/cuda/cudadrv/driver.pyc in safe_cuda_api_call(*args)
214 def safe_cuda_api_call(*args):
215 retcode = libfn(*args)
--> 216 self._check_error(fname, retcode)
217
218 setattr(self, fname, safe_cuda_api_call)
/home/chiroptera/anaconda/lib/python2.7/site-packages/numba/cuda/cudadrv/driver.pyc in _check_error(self, fname, retcode)
244 errname = ERROR_MAP.get(retcode, "UNKNOWN_CUDA_ERROR")
245 msg = "Call to %s results in %s" % (fname, errname)
--> 246 raise CudaAPIError(retcode, msg)
247
248 def get_device(self, devnum=0):
CudaAPIError: Call to cuMemcpyDtoH results in CUDA_ERROR_LAUNCH_TIMEOUT