-
Notifications
You must be signed in to change notification settings - Fork 389
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
Can we only replace part of nn.Linear with te.Linear and others keep unchanged? #1595
Comments
I'm not sure what you mean - if you want to run some Linear layers in fp8 and the rest in higher precision, or you want to run for example forward in fp8 and backward in high precision. Both of this scenarios will be possible when this PR will be merged (hopefully this week). |
Thank you! I mean run some layers in fp8 and other's in high precision. |
Yes, you can do that. You can either just leave some layers as nn.Linear or you can nest the with fp8_autocast(enabled=True):
y = te_linear1(x) # will compute in FP8
with fp8_autocast(enabled=False):
z = te_linear2(y) # will compute in high precision |
I want to merge them as soon as possible, there was temporal shortage of reviewers due to other deadlines with higher priority, but I hope it will be merged soon. |
No description provided.
The text was updated successfully, but these errors were encountered: