-
Notifications
You must be signed in to change notification settings - Fork 39
Fix gamma accuracy gap compared to scipy #1608
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR aims to resolve the gamma accuracy gap compared to scipy by adjusting two key parameters in the XPU distributions.
- Reduced the max threads per block for the gamma kernel from 512 to 256.
- Changed the seed parameter for the random engine in launch_gamma_kernel from 42 to 10.
Comments suppressed due to low confidence (1)
src/ATen/native/xpu/sycl/Distributions.cpp:176
- Reducing the max_threads_per_block from 512 to 256 may affect kernel performance; please ensure this change is validated across different XPU configurations.
/*max_threads_per_block=*/256
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.
Pls. provide an informative and detailed description.
Resolve #1163. This PR aims to resolve the gamma accuracy gap compared to scipy by adjusting two key parameters in the XPU distributions. Motivation: Misaligned key parameters can cause computation differences with CUDA, which may lead to failures in CUDA bias cases. We have decided to follow these parameters.