Skip to content

Conversation

@liuruyan
Copy link
Contributor

@liuruyan liuruyan commented Jun 5, 2025

PR Category

Operator Mechanism

PR Types

Bug fixes

Description

修复 top k big tensor 问题,由于测试样例过多,因此未对全部失败样例进行测试,对两类错误进行了采样测试:

  1. 精度错误:
    paddle.topk(Tensor([1, 1, 2281701379],"float32"), 9, axis=-1, largest=False, ) pass
    paddle.topk(Tensor([1, 1, 2281701379],"float32"), 13, axis=-1, largest=True, ) pass

  2. cuda700
    paddle.topk(x=Tensor([8, 268435457],"float64"), k=4, ) pass
    paddle.topk(Tensor([6, 7, 51130564],"float64"), k=2, ) pass

修复 median big tensor 问题:

  1. 精度错误:
    paddle.median(Tensor([3, 4, 190141782],"int32"), 0, True, ) pass
  2. cuda700
    paddle.median(Tensor([3, 380283564, 2],"int32"), 0, True, )
  3. 额外报错,可能为用例问题,需分析
    [paddle error] paddle.median(Tensor([1073741824, 4],"float16"), -1, False, )
    unsupported operand type(s) for *: 'Tensor' and 'Tensor'

pcard-67164

@paddle-bot
Copy link

paddle-bot bot commented Jun 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 同理,PR可以合入,但仍担心有路径覆盖不到,建议全量复测

@lshpku lshpku merged commit bbbf608 into PaddlePaddle:develop Jun 13, 2025
49 of 53 checks passed
DrRyanHuang pushed a commit to DrRyanHuang/Paddle that referenced this pull request Jun 14, 2025
* fix topk big tensor bug * fix precision bug * fix bug * rebuild ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants