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.75-76】Migrate some ops into pir #59627

Merged
merged 7 commits into from
Dec 27, 2023

Conversation

longranger2
Copy link
Contributor

@longranger2 longranger2 commented Dec 3, 2023

PR types

Others

PR changes

APIs

Description

PIR API 推全升级
将如下算子迁移升级至 pir,并更新单测

  1. fold(5/6)
    当前 fold 的 test_errors 单测暂不支持,可以先跳过,然后在 pr 描述中说明:fold 的 test_errors 单测暂不支持
  2. sigmoid_focal_loss(1/2)
    test/legacy_test/test_zero_dim_tensor.py 文件里的单测 TestLossAPIStatic.test_sigmoid_focal_loss 由于 paddle.static.append_backward 尚未支持 pir 模式,所以先跳过该单测

Copy link

paddle-bot bot commented Dec 3, 2023

你的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.

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

Choose a reason for hiding this comment

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

dirac 的迁移内部有同学在推进,这个 pr 可以先不做~ 麻烦复原吧,然后更新 pr 标题和 pr 描述

This comment was marked as resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我的,没注意,加错了地方

Copy link
Contributor

Choose a reason for hiding this comment

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

该文件下的 TestFoldOpError 单测是否支持?若不支持,请在 pr 描述里说明,并更新单测覆盖率

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个需要支持吗?只是用来测试错误的

Copy link
Contributor

Choose a reason for hiding this comment

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

错误检查也属于本次推全验证任务的一部分,原则上是需要支持的~ 如果尚不支持的话可以在 pr 描述里说明一下

@MarioLulab
Copy link
Contributor

MarioLulab commented Dec 7, 2023

麻烦还需要适配一下 fold 的单测

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~
sigmoid_focal_loss 可以在 pr 描述里记录一下 test/legacy_test/test_zero_dim_tensor.py 文件里的单测 TestLossAPIStatic.test_sigmoid_focal_loss 由于 paddle.static.append_backward 尚未支持 pir 模式,所以先跳过该单测

This comment was marked as resolved.

@@ -3175,7 +3175,7 @@ def sigmoid_focal_loss(
)
)

if in_dynamic_mode():
if in_dynamic_or_pir_mode():
place = _current_expected_place()

This comment was marked as resolved.

@@ -3175,7 +3175,7 @@ def sigmoid_focal_loss(
)
)

if in_dynamic_mode():
if in_dynamic_or_pir_mode():

This comment was marked as resolved.

@@ -190,6 +191,7 @@ def test_info(self):


class TestFoldOpError(unittest.TestCase):
@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.

从 ci 的测试来看,当前 fold 的 test_errors 单测暂不支持,可以先跳过,然后在 pr 描述中说明:fold 的 test_errors 单测暂不支持

@MarioLulab
Copy link
Contributor

Dirac 的迁移已在 #59911 完成~ 麻烦修改一下当前的 pr 标题和 pr 描述吧

@MarioLulab
Copy link
Contributor

请问 long 师傅最近有时间推进这个 pr 吗 😃

@longranger2
Copy link
Contributor Author

请问 long 师傅最近有时间推进这个 pr 吗 😃

我尽力这周弄下哈~,最近有点忙

@MarioLulab
Copy link
Contributor

请问 long 师傅最近有时间推进这个 pr 吗 😃

我尽力这周弄下哈~,最近有点忙

好的辛苦啦~ 最近是年底了所以要摸个底,如果大伙提了 pr 但是由于没空而没法推进的话可以及时告知我,然后我转告 paddle 内部去继续推进 🐶

@longranger2 longranger2 changed the title 【PIR API adaptor No.75-77】Migrate some ops into pir 【PIR API adaptor No.75-76】Migrate some ops into pir Dec 24, 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.

请问修改这个单测文件的原因是?

@@ -29,6 +30,7 @@ def call_sfl_functional(
return res


@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_with_pir_api 应该用来修饰下面的 TestSigmoidFocalLoss.test_SigmoidFocalLoss 函数,而非 test_static 函数。因为被 @test_with_pir_api 修饰的函数返回值为 None,会影响test_SigmoidFocalLoss的正常运行

@longranger2
Copy link
Contributor Author

done

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
辛苦更新一下 sigmoid_focal_loss 的单测覆盖率为 1/2

@0x45f 0x45f merged commit 8f598d9 into PaddlePaddle:develop Dec 27, 2023
29 checks passed
Wanglongzhi2001 pushed a commit to Wanglongzhi2001/Paddle that referenced this pull request Jan 7, 2024
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