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

退出时资源未释放 #32

@hipudding

Description

@hipudding

复现方法:

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直接文件不会报错

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions