Skip to content
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

【PIR API adaptor No.158】nanmedian #58889

Merged
merged 11 commits into from
Dec 18, 2023
Merged

Conversation

Liyulingyue
Copy link
Contributor

PR types

Others

PR changes

APIs

Description

#58067 158

@paddle-bot paddle-bot bot added the contributor External developers label Nov 9, 2023
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label Nov 10, 2023
Copy link
Contributor

@MarioLulab MarioLulab left a comment

Choose a reason for hiding this comment

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

nice work ~
但还有一些问题

Copy link
Contributor

Choose a reason for hiding this comment

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

这个文件下遗漏了 TestNanmedianBF16Op 单测的适配

Copy link
Contributor

Choose a reason for hiding this comment

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

image

需要适配一下 x 是 paddle.pir.OpResult 的情况

Co-authored-by: Lu Qi <61354321+MarioLulab@users.noreply.github.com>
@@ -313,8 +313,12 @@ def nanmedian(x, axis=None, keepdim=False, name=None):
>>> print(y4.numpy())
2.0
"""
if not isinstance(x, Variable):
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不用改成ifelse的形式,if not isinstance(x, (Variable, paddle.pir.OpResult)): 就可以~

Copy link
Contributor

@MarioLulab MarioLulab left a comment

Choose a reason for hiding this comment

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

还请麻烦再 pre-commit 一下

python/paddle/tensor/stat.py Outdated Show resolved Hide resolved
Liyulingyue and others added 2 commits November 16, 2023 12:34
Co-authored-by: Lu Qi <61354321+MarioLulab@users.noreply.github.com>
@@ -150,6 +152,7 @@ def test_axis_case(data, axis):

paddle.enable_static()

@test_with_pir_api
Copy link
Contributor

Choose a reason for hiding this comment

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

test_errors 单测可以看一下哪些在 pir 模式下能正常通过,哪些不能正常通过。不能正常通过的关闭 pir 开关,然后在 pr 描述里注明一下跳过了哪些单测

Copy link
Contributor

Choose a reason for hiding this comment

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

目前从 ci 来看,nanmedian 得 test_errors 单测暂不支持。辛苦在 pr 描述里写上 “test/legacy_test/test_nanmedian.py 文件里的 TestNanmedian.test_errors ” 单测尚不支持,并更新一下单测覆盖率~

Copy link

paddle-ci-bot bot commented Nov 26, 2023

Sorry to inform you that 8771d06's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

Copy link
Contributor

@MarioLulab MarioLulab 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 描述里写上 “test/legacy_test/test_nanmedian.py 文件里的 TestNanmedian.test_errors ” 单测尚不支持,并更新一下单测覆盖率

@0x45f 0x45f merged commit 0db7c9d into PaddlePaddle:develop Dec 18, 2023
29 checks passed
HermitSun pushed a commit to HermitSun/Paddle that referenced this pull request Dec 21, 2023
@Liyulingyue Liyulingyue deleted the 158 branch January 15, 2024 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants