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

[RWKV6] fix backward if h0 not passed #48

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Conversation

hypnopump
Copy link
Contributor

Currently, if initial_state is not passed as 0s, it breaks:

/fla/ops/rwkv6/chunk.py", line 753, in backward
    dh, dh0 = dh.to(q), dh0.to(q)
AttributeError: 'NoneType' object has no attribute 'to'

Fix it by only doing tensor ops if the initial_state is passed

@yzhangcs yzhangcs merged commit eb790cd into fla-org:main Aug 16, 2024
1 check passed
@yzhangcs
Copy link
Member

Thanks~

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

Successfully merging this pull request may close these issues.

2 participants