-
Notifications
You must be signed in to change notification settings - Fork 114
[Bugfix] Fix the bug of torch_npu
that raising segment fault when enable pin_memory
while creating a tensor
#597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…le creating a tensor using Signed-off-by: shen-shanshan <467638484@qq.com>
please update the commit message to make it readable. |
@@ -49,6 +49,9 @@ | |||
FlexibleArgumentParser = None | |||
|
|||
os.environ["RAY_EXPERIMENTAL_NOSET_ASCEND_RT_VISIBLE_DEVICES"] = "1" | |||
# Fix the bug in torch 2.5.1 that raising segment fault when enable `pin_memory` | |||
# while creating a tensor using `torch.tensor`. | |||
os.environ["ACL_OP_INIT_MODE"] = "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when ACL_OP_INIT_MODE
can be set to 0? If it's not hardcode to 1, please add it to env.py. Otherwise it's fine adding here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wangxiyuan I have asked @mengwei805 , this value can be fixed at 1
directly.
ok. |
Thanks |
@ganyi1996ppo please double check this PR as well. If it's fine. Feel free to merge it. |
Have no clue about this, why we need |
@ganyi1996ppo |
@shen-shanshan The question form @ganyi1996ppo is that you should add more comment about the bug. For example is there any related issue from torch-npu? how torch-npu deal with this bug? what and how |
That is complex, give me some time dive into the source code of |
What this PR does / why we need it?
Fix the bug in torch 2.5.1 that raising segment fault when enable
pin_memory
while creating a tensor usingtorch.tensor
.Does this PR introduce any user-facing change?
How was this patch tested?