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.44、96】 Migrate cosh, group_norm into pir #58608

Merged
merged 12 commits into from
Nov 10, 2023

Conversation

MarioLulab
Copy link
Contributor

@MarioLulab MarioLulab commented Nov 2, 2023

PR types

Others

PR changes

Others

Description

任务 issue: #58067

PIR API 推全升级

  1. paddle.cosh 迁移升级至 pir,并更新单测,单测覆盖率(5/6)

TODO: 缺失检查 dtype 的单测 test_error,未来 check_dtype 会下沉到 C++ 侧,本次先跳过

  1. paddle.nn.GroupNorm 迁移升级至 pir,并更新单测,单测覆盖率(19/20)

新增:

  1. 由于 GroupNorm 的单测 test/legacy_test/test_layers.py 的 TestLayer::test_group_norm 依赖于 UniformInitializer 适配 pir,故适配 UniformInitializer 。但 UniformInitializer 的单测添加放到另一个 PR 【PIR API adaptor No.237】 Migrate nn.initializer.Uniform into pir #58642 来做
  2. 修改 python/paddle/framework/random.py 中的 _manual_program_seed,将 base.Program() 写成 static.Program() 的形式,否则在 IrGuard 上下文管理器中,无法将 base.Program() 替换为 pir.Program(),进而导致 UniformInitializer 不能感知到正确的 block.program.random_seed 参数,使 test_group_norm 单测失败

TODO:

  1. 跳过 TestCompositeGroupNorm 单测中的 test_static_comp ,因为其使用了 paddle.static.gradients,现阶段不支持

@paddle-bot paddle-bot bot added the contributor External developers label Nov 2, 2023
@MarioLulab MarioLulab marked this pull request as ready for review November 3, 2023 10:34
@luotao1 luotao1 merged commit bbc3649 into PaddlePaddle:develop Nov 10, 2023
28 checks passed
danleifeng pushed a commit to danleifeng/Paddle that referenced this pull request Nov 14, 2023
…addle#58608)

* add layer_norm and cosh

* add cosh testcase

* add cosh fp16,  bf16

* add uniform

* add group_norm testcase

* add new static mode GroupNorm test case

* delete previously added nn.GroupNorm test case

* modify _manual_program_seed

* fix
SecretXV pushed a commit to SecretXV/Paddle that referenced this pull request Nov 28, 2023
…addle#58608)

* add layer_norm and cosh

* add cosh testcase

* add cosh fp16,  bf16

* add uniform

* add group_norm testcase

* add new static mode GroupNorm test case

* delete previously added nn.GroupNorm test case

* modify _manual_program_seed

* fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants