Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Category
Operator Mechanism
PR Types
Bug fixes
Description
修复 top k big tensor 问题,由于测试样例过多,因此未对全部失败样例进行测试,对两类错误进行了采样测试:
精度错误:
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
cuda700
paddle.topk(x=Tensor([8, 268435457],"float64"), k=4, ) pass
paddle.topk(Tensor([6, 7, 51130564],"float64"), k=2, ) pass
修复 median big tensor 问题:
paddle.median(Tensor([3, 4, 190141782],"int32"), 0, True, ) pass
paddle.median(Tensor([3, 380283564, 2],"int32"), 0, True, )
[paddle error] paddle.median(Tensor([1073741824, 4],"float16"), -1, False, )
unsupported operand type(s) for *: 'Tensor' and 'Tensor'
pcard-67164