mirror of
https://github.com/NVIDIA/TensorRT-LLM.git
synced 2026-01-14 06:27:45 +08:00
[None][fix] add gc for test fixture (#8220)
Signed-off-by: Xin He (SW-GPU) <200704525+xinhe-nv@users.noreply.github.com>
This commit is contained in:
parent
d3059dbd8a
commit
2655995a09
@ -15,6 +15,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import datetime
|
||||
import gc
|
||||
import os
|
||||
import platform
|
||||
import re
|
||||
@ -2524,6 +2525,7 @@ def torch_empty_cache() -> None:
|
||||
"""
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
gc.collect()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user