Skip to content

Commit 8c1938b

Browse files
committed
fix large npu memory cost
1 parent e38bacb commit 8c1938b

File tree

1 file changed

+1
-0
lines changed
  • deploy/py_infer/src/data_process/postprocess

1 file changed

+1
-0
lines changed

deploy/py_infer/src/data_process/postprocess/builder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def get_device_status():
4444
def _get_status():
4545
nonlocal status
4646
try:
47+
ms.set_context(max_device_memory="0.01GB")
4748
status = ms.Tensor([0])[0:].asnumpy()[0]
4849
except RuntimeError:
4950
status = 1

0 commit comments

Comments
 (0)