Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

退出时资源未释放 #32

Open
hipudding opened this issue Jul 30, 2024 · 0 comments
Open

退出时资源未释放 #32

hipudding opened this issue Jul 30, 2024 · 0 comments

Comments

@hipudding
Copy link
Collaborator

复现方法:

import torch
import torch_npu

s = torch.npu.Stream()
print(s)
x = torch.randn(2, 2).npu()
y = torch.randn(2, 2).npu()

with torch.npu.stream(s):   
    z = x.mm(y)

print(z)

ctrl+C后,报错如下:

/home/hua/miniconda3/envs/pt/lib/python3.10/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 41 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '

直接python直接文件不会报错

@hipudding hipudding changed the title 推出时资源未释放 退出时资源未释放 Jul 30, 2024
@FFFrog FFFrog closed this as completed Jul 31, 2024
@FFFrog FFFrog reopened this Jul 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants