mamba icon indicating copy to clipboard operation
mamba copied to clipboard

big scan dim cause cuda error

Open mmm-cc opened this issue 1 year ago • 4 comments
trafficstars

mmm-cc avatar Jul 31 '24 03:07 mmm-cc

when i use input with shape [b, c ,l] c>80000 in this function _out, x, *rest = selective_scan_cuda.fwd(u, delta, A, B, C, D, z, delta_bias, delta_softplus) cause image and i checked the memory of input is about 1 mb ,so it can't be a oom problem, and all the input located in cuda, so not a location problem. but with a smaller dim,(about 50000), it works. so, is there a limitation in input dim of mamba , and how can i use a big dim tensor in mamba?

mmm-cc avatar Jul 31 '24 03:07 mmm-cc

Limit is probably < 64000.

tridao avatar Jul 31 '24 03:07 tridao

Limit is probably < 64000.

ok, thanks a lot.

mmm-cc avatar Jul 31 '24 10:07 mmm-cc

Could be wrong, but I think that this is just a bug. I submitted a PR, which fixes at least one illegal memory access error in Mamba2. I noticed that this happened randomly at high lengths due to using more of HBM, and leaking into system memory.

Hprairie avatar Aug 24 '24 04:08 Hprairie