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

Enable loss-parallel in example #19882

Merged
merged 4 commits into from
May 20, 2024
Merged

Conversation

awaelchli
Copy link
Member

@awaelchli awaelchli commented May 20, 2024

What does this PR do?

Enables loss_parallel for loss computation and backward as suggested by @carmocca #19879 (comment). In Fabric the user has convenient control over that. In LightningModule, the user has to override the backward hook in addition to the modification in the training step hook.


📚 Documentation preview 📚: https://pytorch-lightning--19882.org.readthedocs.build/en/19882/

cc @Borda @carmocca @justusschock @awaelchli

@awaelchli awaelchli added this to the 2.3 milestone May 20, 2024
@github-actions github-actions bot added fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package labels May 20, 2024
Copy link
Contributor

github-actions bot commented May 20, 2024

⚡ Required checks status: All passing 🟢

Groups summary

🟢 lightning_fabric: Azure GPU
Check ID Status
lightning-fabric (GPUs) (testing Fabric | latest) success
lightning-fabric (GPUs) (testing Lightning | latest) success

These checks are required after the changes to examples/fabric/tensor_parallel/parallelism.py, examples/fabric/tensor_parallel/train.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 60 minutes every 180 seconds. If you have any other questions, contact carmocca for help.

@carmocca carmocca merged commit d76feef into master May 20, 2024
13 checks passed
@carmocca carmocca deleted the feature/loss-parallel-example branch May 20, 2024 11:19
@mergify mergify bot added the ready PRs ready to be merged label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
example fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants