conftest.py 152 B

12345678910
  1. import pytest
  2. import torch
  3. def clear_gpu_memory():
  4. '''
  5. clear GPU memory
  6. '''
  7. torch.cuda.empty_cache()
  8. print("GPU memory cleared.")