You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupy/cusparse.py in csr2coo(x, data, indices)
900 cusparse.xcsr2coo(
901 handle, x.indptr.data.ptr, nnz, m, row.data.ptr,
--> 902 cusparse.CUSPARSE_INDEX_BASE_ZERO)
903 # data and indices did not need to be copied already
904 return cupyx.scipy.sparse.coo_matrix(
cupy/cuda/cusparse.pyx in cupy.cuda.cusparse.xcsr2coo()
OverflowError: value too large to convert to int
The full traceback:
---------------------------------------------------------------------------
OverflowError Traceback (most recent call last)
<timed exec> in <module>
~/work/github.com/slowkow/rapids-single-cell-examples/notebooks/rapids_scanpy_funcs.py in filter_genes(sparse_gpu_array, genes_idx, min_cells)
269 Genes containing a number of cells below this value will be filtered
270 """
--> 271 thr = np.asarray(sparse_gpu_array.sum(axis=0) >= min_cells).ravel()
272 filtered_genes = cp.sparse.csr_matrix(sparse_gpu_array[:, thr])
273 genes_idx = genes_idx[np.where(thr)[0]]
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/base.py in sum(self, axis, dtype, out)
388
389 if axis == 0:
--> 390 ret = self.T.dot(cupy.ones(m, dtype=self.dtype)).reshape(1, n)
391 else: # axis == 1
392 ret = self.dot(cupy.ones(n, dtype=self.dtype)).reshape(m, 1)
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/base.py in dot(self, other)
307 def dot(self, other):
308 """Ordinary dot product"""
--> 309 return self * other
310
311 def getH(self):
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/csc.py in __mul__(self, other)
111 return self._with_data(self.data * other)
112 elif other.ndim == 1:
--> 113 self.sum_duplicates()
114 if cusparse.check_availability('csrmv'):
115 csrmv = cusparse.csrmv
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/compressed.py in sum_duplicates(self)
333 self._has_canonical_format = True
334 return
--> 335 coo = self.tocoo()
336 coo.sum_duplicates()
337 self.__init__(coo.asformat(self.format))
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/csc.py in tocoo(self, copy)
214
215 """
--> 216 return self.T.tocoo(copy).T
217
218 def tocsc(self, copy=None):
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupyx/scipy/sparse/csr.py in tocoo(self, copy)
268 indices = self.indices
269
--> 270 return cusparse.csr2coo(self, data, indices)
271
272 def tocsc(self, copy=False):
~/.conda/envs/rapidgenomics/lib/python3.7/site-packages/cupy/cusparse.py in csr2coo(x, data, indices)
900 cusparse.xcsr2coo(
901 handle, x.indptr.data.ptr, nnz, m, row.data.ptr,
--> 902 cusparse.CUSPARSE_INDEX_BASE_ZERO)
903 # data and indices did not need to be copied already
904 return cupyx.scipy.sparse.coo_matrix(
cupy/cuda/cusparse.pyx in cupy.cuda.cusparse.xcsr2coo()
OverflowError: value too large to convert to int
You are hitting a CuPy specific error, not a Numba or Pyculib error. I'd suggest asking on forums or issue-trackers for CuPy or RAPIDS.
But from my experience, this error is usually from converting a Python int that is too big for a C int. I usually encounter this kind of error when I try to put an address that has a 1 on the MSB into a signed C int.
Could I please ask if you have any ideas for working around this error?
It seems that
array.sum(axis=0)
threw an error.The full traceback:
I also posted this issue at NVIDIA-Genomics-Research/rapids-single-cell-examples#50
The text was updated successfully, but these errors were encountered: