mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Metax] adapt DeepSeek (#4498)
This commit is contained in:
@@ -43,8 +43,8 @@ class DefaultModelLoaderV1(BaseModelLoader):
|
||||
|
||||
def clean_memory_fragments(self) -> None:
|
||||
"""clean_memory_fragments"""
|
||||
if current_platform.is_cuda():
|
||||
paddle.device.cuda.empty_cache()
|
||||
if current_platform.is_cuda() or current_platform.is_maca():
|
||||
paddle.device.empty_cache()
|
||||
paddle.device.synchronize()
|
||||
|
||||
@save_model()
|
||||
|
||||
Reference in New Issue
Block a user