-
-
Couldn't load subscription status.
- Fork 10.9k
[ROCm] Add skinny gemm bias support for dtypes fp16,bf16,fp8 #24988
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
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.
Code Review
This pull request adds support for bias in skinny GEMM kernels for fp16 and bf16 data types. The changes are mostly correct, but there is a critical issue in how the optional bias tensor is handled. The current implementation will fail if None is passed for the bias from Python, and it is also vulnerable to a division-by-zero error if an empty tensor is passed. My review provides a set of fixes to correctly handle the optional bias tensor using c10::optional<at::Tensor>, which involves changes to the op registration, C++ function signatures, and bias handling logic.
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
87faa59 to
8ef88af
Compare
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
|
This pull request has merge conflicts that must be resolved before it can be |
…ny gemm tests to be zero-centered, to avoid saturation and false passes. Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
721aff6 to
faed43b
Compare
Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Head branch was pushed to by a user without write access
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com>
Head branch was pushed to by a user without write access
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com>
Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com> Signed-off-by: yewentao256 <zhyanwentao@126.com>
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com> Signed-off-by: gaojc <1055866782@qq.com>
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com>
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com>
…oject#24988) Signed-off-by: Hashem Hashemi <hashem.hashemi@amd.com> Signed-off-by: Hashem Hashemi <159079214+amd-hhashemi@users.noreply.github.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Purpose
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.