serving xpu memory opt (#10358)
This commit is contained in:
parent
be29833b2b
commit
d7b765fd3f
1 changed files with 2 additions and 0 deletions
|
|
@ -256,6 +256,8 @@ class ModelWorker(BaseModelWorker):
|
|||
self.context_len,
|
||||
self.stream_interval,
|
||||
):
|
||||
if self.device == "xpu":
|
||||
torch.xpu.empty_cache()
|
||||
ret = {
|
||||
"text": output["text"],
|
||||
"error_code": 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue