From 001a66bbfe8093d2ff7336eeebdb0198b498dce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Tue, 11 Feb 2025 10:08:19 +0800 Subject: [PATCH] oom fix --- funasr/bin/train.py | 8 ++++---- funasr/bin/train_ds.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/funasr/bin/train.py b/funasr/bin/train.py index b2b1dcdb2..45e23a8c6 100644 --- a/funasr/bin/train.py +++ b/funasr/bin/train.py @@ -221,10 +221,10 @@ def main(**kwargs): ) trainer.start_step = 0 - device = next(model.parameters()).device - if device.type == 'cuda': - with torch.cuda.device(): - torch.cuda.empty_cache() + # device = next(model.parameters()).device + # if device.type == 'cuda': + # with torch.cuda.device(): + # torch.cuda.empty_cache() time_escaped = (time.perf_counter() - time_slice_i) / 3600.0 logging.info( diff --git a/funasr/bin/train_ds.py b/funasr/bin/train_ds.py index bfa1dff94..b28752ba8 100644 --- a/funasr/bin/train_ds.py +++ b/funasr/bin/train_ds.py @@ -184,10 +184,10 @@ def main(**kwargs): ) trainer.start_step = 0 - device = next(model.parameters()).device - if device.type == 'cuda': - with torch.cuda.device(): - torch.cuda.empty_cache() + # device = next(model.parameters()).device + # if device.type == 'cuda': + # with torch.cuda.device(): + # torch.cuda.empty_cache() time_escaped = (time.perf_counter() - time_slice_i) / 3600.0 logging.info(