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

Override cast_to_fp8 in te.module.linear #120

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Override cast_to_fp8 in te.module.linear #120

merged 1 commit into from
Nov 3, 2023

Conversation

tocean
Copy link
Contributor

@tocean tocean commented Nov 3, 2023

Description
Fix a bug in TE integration.
Currently we only override te.cpp_extensions.cast_to_fp8 with our own cat_to_fp8 in msamp.te.extension.

We also need to override te.module.linear.cast_to_fp8. Otherwise, it will use the original function which does not support ScalingTensor and will raise an exception in Megatron-LM

Major Revision

  • Override cast_to_fp8 in te.module.linear

Copy link
Contributor

@wkcn wkcn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@tocean tocean requested a review from guoshzhao November 3, 2023 03:20
@wkcn wkcn merged commit 3b0567a into main Nov 3, 2023
9 checks passed
@wkcn wkcn deleted the yuxiang/te_bugbix branch November 3, 2023 05:39
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

Successfully merging this pull request may close these issues.

3 participants