-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Support NVIDIA's Transformer Engine #17597
Conversation
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
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.
Thanks for the reviews!
I'm not sure if this will land, or at least with the conversion logic as it seems very flawed.
However, it's as flawed as for any technique that needs to do it.
We could still consider the plugin even if the conversion is not done automatically. Or we could just move on with this.
This is an important unsolved problem in pytorch. Layers are not composable at all.
What do you guys think?
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
⚡ Required checks status: All passing 🟢Groups summary🟢 pytorch_lightning: Tests workflow
These checks are required after the changes to 🟢 pytorch_lightning: Azure GPU
These checks are required after the changes to 🟢 pytorch_lightning: Benchmarks
These checks are required after the changes to 🟢 fabric: Docs
These checks are required after the changes to 🟢 lightning_fabric: CPU workflowThese checks are required after the changes to 🟢 lightning_fabric: Azure GPU
These checks are required after the changes to 🟢 mypy
These checks are required after the changes to 🟢 installThese checks are required after the changes to 🟢 link-check
These checks are required after the changes to Thank you for your contribution! 💜
|
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.
Minor nits and questions. Great work!
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
src/lightning/fabric/plugins/precision/fp8_transformer_engine.py
Outdated
Show resolved
Hide resolved
176d37a
to
b81ffe6
Compare
What does this PR do?
Fixes #17172
Tested in Lightning-AI/litgpt#123
cc @Borda @carmocca @justusschock @awaelchli