Skip to content

fix: MPS cache not flushed in alora test GPU cleanup #790

Description

@planetf1

PR #765 added CUDA GPU cleanup to the alora integration tests (test_alora_train_integration.py:316-318, 398-400), but the MPS equivalent is missing. On Apple Silicon with MPS-capable PyTorch (>= 2.8), the GPU memory won't be reclaimed between tests.

The fix is straightforward — the pattern already exists in memory_cleaner() (conftest.py:448-449):

if torch.backends.mps.is_available():
    torch.mps.empty_cache()

Just needs adding after the torch.cuda blocks in both cleanup sites.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtesting

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions