Skip to content

Conversation

@AlAuAu
Copy link
Contributor

@AlAuAu AlAuAu commented Nov 4, 2025

PR Category

User Experience

PR Types

New features

Description

API Compatibility add:
paddle.Tensor.clamp_
paddle.nn.functional.logsigmoid
paddle.functional.meshgrid
paddle.nn.init.calculate_fan_in_and_fan_out
paddle.autocast
paconvert结果:
paddle.Tensor.clamp

c451415d1254e2661993b8e8b46fda2d
paddle.nn.functional.logsigmoid
image
paddle.functional.meshgrid:等底层实现的代码合入由他来测试
paddle.nn.init._calculate_fan_in_and_fan_out
image
paddle.autocast:
image

@paddle-bot
Copy link

paddle-bot bot commented Nov 4, 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.

@paddle-bot paddle-bot bot added the contributor External developers label Nov 4, 2025
zhwesky2010
zhwesky2010 previously approved these changes Nov 4, 2025
Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM,可以一次合并提交多个别名

@AlAuAu AlAuAu changed the title [API Compatibility] Add paddle.Tensor.clamp_ [API Compatibility] Add paddle.Tensor.clamp_ ,paddle.nn.functional.logsigmoid, paddle.functional.meshgrid, paddle.nn.init.calculate_fan_in_and_fan_out ,paddle.autocast Nov 5, 2025
get_autocast_gpu_dtype,
is_autocast_enabled,
)
from .amp.auto_cast import autocast as _autocast
Copy link
Contributor

Choose a reason for hiding this comment

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

这里直接导入autocast就可以了

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (develop@f8e52bf). Learn more about missing BASE report.

Files with missing lines Patch % Lines
python/paddle/nn/init.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             develop   #76206   +/-   ##
==========================================
  Coverage           ?   94.73%           
==========================================
  Files              ?        6           
  Lines              ?       19           
  Branches           ?        0           
==========================================
  Hits               ?       18           
  Misses             ?        1           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlAuAu
Copy link
Contributor Author

AlAuAu commented Nov 6, 2025

/re-run all-failed

@AlAuAu
Copy link
Contributor Author

AlAuAu commented Nov 6, 2025

/re-run all-failed

Copy link
Contributor

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

LGTM

from paddle.base import core


@unittest.skipIf(
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的skipIf怎么写了这么多

and core.get_xpu_device_version(0) < core.XPUVersion.XPU3,
"run test when xpu's compute capability >= xpu3.",
)
@unittest.skipIf(
Copy link
Contributor

Choose a reason for hiding this comment

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

这两个xpu是不是重复的

def test_cal_fan_in_and_out(self):
x = paddle.tensor.randn([10])
self.assertEqual(
_calculate_fan_in_and_fan_out(x),
Copy link
Contributor

Choose a reason for hiding this comment

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

这里不用重新复制一个api过来,可以直接算好expect的值

@zhwesky2010
Copy link
Contributor

zhwesky2010 commented Nov 6, 2025

@wanghuancoder skipif求approve。单测写法优化下个PR再提,赶下时间。

@AlAuAu
Copy link
Contributor Author

AlAuAu commented Nov 6, 2025

/re-run all-failed

1 similar comment
@AlAuAu
Copy link
Contributor Author

AlAuAu commented Nov 6, 2025

/re-run all-failed

@AlAuAu
Copy link
Contributor Author

AlAuAu commented Nov 6, 2025

/re-run all-failed

@zhwesky2010 zhwesky2010 merged commit 48c74b8 into PaddlePaddle:develop Nov 6, 2025
131 of 141 checks passed
Manfredss pushed a commit to Manfredss/PaddleDebug that referenced this pull request Nov 7, 2025
…gsigmoid, paddle.functional.meshgrid, paddle.nn.init.calculate_fan_in_and_fan_out ,paddle.autocast (PaddlePaddle#76206)

* sharding stage3 bugfix

* sharding stage3 bugfix

* sharding stage3 bugfix

* sharding stage3 bugfix

* sharding stage3 bugfix

* sharding stage3 bugfix

* support recompute's forward and backward in pipeline mode

* [API Compatibility] Add paddle.Tensor.clip_

* Revert "support recompute's forward and backward in pipeline mode"

This reverts commit 7fd48d9.

* Revert "[API Compatibility] Add paddle.Tensor.clip_"

This reverts commit 025efc3.

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast

* [API Compatibility] Add clip_、logsigmoid、_calculate_fan_in_and_fan_out、meshgrid、autocast
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants