Lightning-AI / Lightning-AI/lightning-thunder
Guard nvFuser-based tests with minimum required compute capability or BF16 capability
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
Running `thunder/tests/test_torch_compile_executor.py::test_torch_compile_cat_nvfuser_phi2_tanh` and likely other tests would fail on pre-Ampere GPUs with
```py
RuntimeError: Target compute capability is 7.0 but this fusion requires at least 8.0. Reason: Fusion contains BFloat16 values which was introduced in Ampere (8.0)
```
PyTorch has a utility function to query whether the current device supports BF16 `torch.cuda.is_bf16_supported`.
cc @borda @tfogal
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in thunder/tests/test_torch_compile_executor.py with test_torch_compile_cat_nvfuser_phi2_tanh, then review nearby nvFuser-based tests. Check torch.cuda.is_bf16_supported and the existing test behavior on pre-Ampere GPUs. Done means unsupported devices no longer fail these tests while supported devices still run them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100