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

Potential Bug in **_attn_fwd_tma** Function #5816

Open
qinxiangyujiayou opened this issue Feb 5, 2025 · 0 comments
Open

Potential Bug in **_attn_fwd_tma** Function #5816

qinxiangyujiayou opened this issue Feb 5, 2025 · 0 comments
Labels

Comments

@qinxiangyujiayou
Copy link

Describe the bug

Hi, I believe I found a potential bug in the _attn_fwd_tma function. Specifically, it concerns how the offset_y variable is computed.

Here is the relevant part of the code:

start_m = tl.program_id(0)
off_hz = tl.program_id(1)
off_z = off_hz // H
off_h = off_hz % H
offset_y = off_z + off_h * N_CTX

The calculation of offset_y is a bit confusing. Based on the current implementation, it is computed as:

offset_y = off_z + off_h * N_CTX

However, I believe it should be:

offset_y = off_hz * N_CTX

Could you clarify if this is a bug or explain the reasoning behind the current implementation? Thanks for your help!

Environment details

The latest version of Triton

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

No branches or pull requests

1 participant