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

[fused moe kernel] bug for column major? #25

Open
sleepwalker2017 opened this issue Jul 24, 2024 · 1 comment
Open

[fused moe kernel] bug for column major? #25

sleepwalker2017 opened this issue Jul 24, 2024 · 1 comment

Comments

@sleepwalker2017
Copy link

sleepwalker2017 commented Jul 24, 2024

https://github.com/pytorch-labs/applied-ai/blob/main/kernels/triton/inference/col_major_moe_gemm/v2_moe_fused.py

    pid_m = (pid % grid_n)
    pid_n = pid // grid_m

    return pid_m, pid_n

The column major seems to give wrong result. In fact, a lot of blocks doesn't do any computation because they just return because of incorrect value. So the kernel seems much faster, but it's wrong. right?

@sleepwalker2017 sleepwalker2017 changed the title [fused moe kernel]Is this a bug? [fused moe kernel] bug for column major? Jul 24, 2024
@pengcuo
Copy link

pengcuo commented Nov 15, 2024

#33

Hi, I fixed it.
I also found the error. The kernel seems much faster, because it reuses many weights(but it is wrong).

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