-
Notifications
You must be signed in to change notification settings - Fork 188
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
[float8nocompile]: Wrap fp8 conversion kernels in autograd func and use in Float8NoCompileLinear #1452
[float8nocompile]: Wrap fp8 conversion kernels in autograd func and use in Float8NoCompileLinear #1452
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1452
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit b8e1c6a with merge base 692236a (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
""" | ||
A differentiable conversion to fp8. | ||
* forward: no-op | ||
* backward: convert to fp8_e5m2 with tensor-wise dynamic scaling |
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.
nit: remove e5m2 from docstring, since the target dtype is passed as an argument
|
||
@staticmethod | ||
def backward(ctx, gradY): | ||
# cast grad output to e5m2 in backward pass |
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.
remove e5m2 from comment
looks good, please ensure CI is green before landing |
2daef80
to
b8e1c6a
Compare
Summary
Test plan
pytest test/test.py