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

a small typo and fix #1390

Open
liguohao96 opened this issue Dec 16, 2024 · 3 comments
Open

a small typo and fix #1390

liguohao96 opened this issue Dec 16, 2024 · 3 comments

Comments

@liguohao96
Copy link

I compiled from source and run a simple test but failed at this line

return out if not return_softmax else (out, softmax_lse, S_dmask)

with the following error: unboundLocalError: cannot access local variable 'out' where it is not associated with a value

I believe it is caused by the wrong ident of this line

out = out_padded[..., :head_size_og]

we should move this line out of if block.

@tridao
Copy link
Contributor

tridao commented Dec 16, 2024

I see, thanks for catching it. Can you send a PR?

@liguohao96
Copy link
Author

Here is the PR #1392 .
BTW, I tried to add some 'forward-only' tests, but finally I gave up because I failed to find an elegant way to reuse current test functions.

@jiagaoxiang
Copy link

Could you please merge this PR ASAP to unblock? Thank you very much!

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

3 participants