Skip to content

Commit b03d7fe

Browse files
committed
wait for thread tasks only when every module has completed. (#1852)
Signed-off-by: Qubitium <Qubitium@modelcloud.ai>
1 parent 44b2ad2 commit b03d7fe

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

gptqmodel/looper/module_looper.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -561,14 +561,12 @@ def finalize_module(module):
561561

562562
#del module
563563

564-
565564
if auto_gc:
566565
torch_empty_cache()
567566

568-
# LifeCycle: All sub-modules have finalized meaning quantization work is complete
569-
# wait for all thread tasks
570-
ASYNC_WORKER.join()
571-
567+
# LifeCycle: All sub-modules have finalized meaning quantization work is complete
568+
# wait for all thread tasks
569+
ASYNC_WORKER.join()
572570

573571
# paranoid safety check
574572
torch_sync()

gptqmodel/utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
log = setup_logger()
1313

14-
ASYNC_WORKER = AsyncManager(threads=1)
14+
ASYNC_WORKER = AsyncManager(threads=4)
1515

1616
# TODO: datasets is not compatible with free threading
1717
if has_gil_disabled():

0 commit comments

Comments
 (0)