已关闭
[Bug]: 执行acl初始化操作后,创建NPU tensor触发abort #1528
absoler创建于  1月29日关闭于  7月4日
absoler
absoler
1月29日 创建

环境信息

- 操作系统 Huawei Cloud EulerOS release 2.0
- 昇腾硬件信息 910B
- CANN软件版本 8.3.RC1
- 安装的对应软件版本 torch/torch-npu 2.7.1

🐛 问题描述

python执行:

import acl
acl.init()
acl.rt.set_device(0)
acl.rt.create_context(0)
import torch
t = torch.tensor([1, 2], device='npu')

触发abort

free(): invalid pointer
Aborted (core dumped)

欢迎加入社区,感谢您对社区的贡献 🎉!

likedislike
absolerabsoler
1月29日 修改了issue 的描述
ascend-robotascend-robot成员
1月29日 添加了label:bug
nikita-merkulov
1月29日 评论:

I think this might be an uninitialization race. Did you provide above the whole code, or do you also work with the tensor t after? Try to add acl.finalize() in the end if you don't have it.

likedislike
absoler
absoler
2月3日 评论:

I think this might be an uninitialization race. Did you provide above the whole code, or do you also work with the tensor t after? Try to add acl.finalize() in the end if you don't have it.

@nikita-mee

No, this is a case executed in a python console, after creation of t, the core dump will happen. Here's illustration:
image.png

likedislike
nikita-merkulov
2月9日 评论:

I think this might be an uninitialization race. Did you provide above the whole code, or do you also work with the tensor t after? Try to add acl.finalize() in the end if you don't have it.

@nikita-mee

No, this is a case executed in a python console, after creation of t, the core dump will happen. Here's illustration:
image.png

@absoler

Right, no connection to uninitialization then. Then maybe someone else would be able to help...

likedislike
huangyunlong成员
4月10日 评论:

Thank you for your feedback. You can upgrade to torch_npu versions after 7.3.0

likedislike
chenrayray
chenrayray成员
7月4日 评论:

您好,本Issue因长期无有效互动,现暂时关闭。如问题依然存在,请重新打开并提供最新复现信息,我们会继续跟进。感谢理解!

likedislike
chenrayraychenrayray成员
7月4日 issue状态由 TODO 改变为 DONE
chenrayraychenrayray成员
7月4日 关闭了 issue
ascend-robotascend-robot成员
7月4日 添加了label:resolved