-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Bugfix, read-write race at fast_ln_fwd_kernel #56435
Bugfix, read-write race at fast_ln_fwd_kernel #56435
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@@ -295,6 +295,7 @@ __global__ __launch_bounds__(THREADS_PER_CTA) void fast_ln_fwd_kernel( | |||
} | |||
|
|||
if (WARPS_N > 1) { | |||
__syncthreads(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sync needed? or line 302 is enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is necessary. Without sync, some threads are reading smem at L274, and some are writing smem at L300 in parallel.
compute-sanitizer also can point out they have read-write race.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
the unittest in #56100 is OK.
Log:
|
ALL CI pipelines are passed. It is ready to be merged. |
PR types
Bug fixes
PR changes
OPs
Description
Fix #56100 and turn on
fast_ln_fwd_kernel