From b9bd9702a996eb3cd17f76183933817d399f4d5f Mon Sep 17 00:00:00 2001 From: Kyle Sayers Date: Wed, 29 Jan 2025 03:56:09 +0000 Subject: [PATCH] remove empty cache call Signed-off-by: Kyle Sayers --- src/llmcompressor/modifiers/utils/pytorch_helpers.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/llmcompressor/modifiers/utils/pytorch_helpers.py b/src/llmcompressor/modifiers/utils/pytorch_helpers.py index 1314d5c6e..56c33de18 100644 --- a/src/llmcompressor/modifiers/utils/pytorch_helpers.py +++ b/src/llmcompressor/modifiers/utils/pytorch_helpers.py @@ -106,10 +106,6 @@ def run_calibration_forward( # move on to next calibration sample intermediates.append((e.args, e.kwargs)) - # TODO: not ideal, figure out where we aren't freeing memory instead - # currently without this we run OOM on the 2nd forward pass - torch.cuda.empty_cache() - return intermediates