Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about two forloops in wkv6_cuda.cu #48

Open
Seeker98 opened this issue Dec 22, 2024 · 2 comments
Open

Question about two forloops in wkv6_cuda.cu #48

Seeker98 opened this issue Dec 22, 2024 · 2 comments

Comments

@Seeker98
Copy link

i notice that there are two for loops in https://github.com/OpenGVLab/Vision-RWKV/blob/master/classification/mmcls_custom/models/backbones/cuda_v6/wkv6_cuda.cu line 23-57. what is the purpose of the first loop? i compared with RWKV-LM's cuda files but find no ideas.

@Seeker98 Seeker98 changed the title Question about two forloops in wk Question about two forloops in wkv6_cuda.cu Dec 22, 2024
@Seeker98
Copy link
Author

some other questions about wkv6_cuda: i observed nan errors and change all exp calls to __expf(-__expf(**)), and the model seemed to perform well (but i honestly dont know why i changed to this, perhaps intuition?).
I'm currently using rwkv with a full-length pixel sequence, and found that T_MAX must greaterequal than total pixel numbers in an image, smaller will cause cuda error: illegal memory access. but larger T_MAX leads to immediate oom, even if the model itself is really small(<3m params)... (my card: rtx 4090
1)
Any advices to address these? appreciate for ur help.

@c1ircle
Copy link

c1ircle commented Jan 3, 2025

Same question about two loops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants