Files
Liger-Kernel/test/conftest.py
T
Yun Dai 6cdc93deee fix FLCE AMP issue (#318)
## Summary
<!--- This is a required section; please describe the main purpose of
this proposed code change. --->
fixes #305 : just rely on torch AMP to determine the input dtype when
AMP context is enabled
<!---
## Details
This is an optional section; is there anything specific that reviewers
should be aware of?
--->

## Testing Done
<!--- This is a required section; please describe how this change was
tested. --->

<!-- 
Replace BLANK with your device type. For example, A100-80G-PCIe

Complete the following tasks before sending your PR, and replace `[ ]`
with
`[x]` to indicate you have done them. 
-->

- Hardware Type: <BLANK>
- [x] run `make test` to ensure correctness
- [x] run `make checkstyle` to ensure code style
- [x] run `make test-convergence` to ensure convergence
2024-10-25 17:23:23 -07:00

9 lines
122 B
Python

import pytest
import torch
@pytest.fixture(autouse=True)
def clear_cuda_cache():
yield
torch.cuda.empty_cache()