Lightning-AI / lightning-thunder

Make PyTorch models up to 40% faster! Thunder is a source to source compiler for PyTorch. It enables using different hardware executors at once; across one or thousands of GPUs.
Apache License 2.0
1.07k stars 60 forks source link

Test for resnet18 accuracy #645

Closed kiya00 closed 2 days ago

kiya00 commented 4 days ago
Before submitting - [ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements) - [ ] Did you read the [contributor guideline](https://github.com/Lightning-AI/pytorch-lightning/blob/main/.github/CONTRIBUTING.md), Pull Request section? - [ ] Did you make sure to update the docs? - [ ] Did you write any new necessary tests?

What does this PR do?

Add test for resnet18 accuracy

2 issues:

  1. when backward+nvfuserex: https://github.com/Lightning-AI/lightning-thunder/pull/451#issuecomment-2186631228
  2. when backward+torchex+fp32: numerical accuracy problem
kiya00 commented 4 days ago

Hi @crcrpar , do you have any idea why backward+FP32 has problems with numerical accuracy?