Skip to content

Conversation

@Difers
Copy link
Contributor

@Difers Difers commented Aug 5, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

Pcard-73145

  • 问题背景:
    在以下case argsort会导致hang住:
import numpy
import paddle
input_tensor = (numpy.random.random([2, 1140850690]) - 0.5).astype("float16")
paddle_x = paddle.to_tensor(numpy_tensor)
paddle_out = paddle.argsort(paddle_x)
constexpr int64_t max_elements = 1 << 30;
const int64_t segment_size = num_cols;
const int64_t element_per_call = std::min(max_elements, total_elements);
const int64_t batch_size = (element_per_call / segment_size) * segment_size; 

在被sort的维度大于2^30时,(element_per_call / segment_size)为0,导致死循环

@paddle-bot
Copy link

paddle-bot bot commented Aug 5, 2025

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@wanghuancoder wanghuancoder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wanghuancoder wanghuancoder merged commit 51c12fb into PaddlePaddle:develop Aug 7, 2025
87 of 90 checks passed
Enigmatisms pushed a commit to Enigmatisms/Paddle that referenced this pull request Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants