-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[xdoctest] reformat example code with google style in No.366 #57786
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
import math 这个地方报错了 RuntimeError: (NotFound) The kernel with key (CPU, Undefined(AnyLayout), float16) of kernel |
Sorry to inform you that 2234c06's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
这个地方报错了 可以先去掉这个文件的修改,把其他文件改完提上来。这个文件单独提一个PR修 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
另外,跟这个 PR : #58213 什么关系?
如果文件分开提交的话,至少把标题改一下吧 ~ 😅
>>> paddle_x = paddle.cast(paddle.randn(shape=[32, 256]), dtype=paddle.float16) | ||
>>> paddle_weight = paddle.cast(paddle.randn(shape=[256]), dtype=paddle.float16) | ||
>>> paddle_bias = paddle.cast(paddle.randn(shape=[256]), dtype=paddle.float16) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里这样写本身没什么问题,只是不明白为什么要 cast
?直接在 paddle.randn
里面设置 dtype
不行吗?
>>> # doctest: +REQUIRES(env:GPU)
>>> import paddle
>>> paddle.device.set_device('gpu')
>>> paddle_x = paddle.randn(shape=[32, 256], dtype=paddle.float16)
>>> paddle_weight = paddle.randn(shape=[256], dtype=paddle.float16)
>>> paddle_bias = paddle.randn(shape=[256], dtype=paddle.float16)
>>> epsilon = 1e-6
>>> paddle_rmsnorm = paddle.incubate.nn.functional.fused_rms_norm(paddle_x, paddle_weight, paddle_bias, epsilon, 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例本身没什么问题,是不是要处理一下 conflict ~
#58168 已经把这个文件改好了,是带有 cast 的版本 ~ 你那边应该是在这个 PR 之前 pull 的代码,所以现在提交冲突了 ~ 有两个办法:
你可以先试试第二个办法,有问题咱们再看看 ~
|
干脆关了吧 |
@SigureMo 帮忙关了吧 ~ |
PR types
Others
PR changes
Others
Description
修改如下文件的示例代码,使其通过
xdoctest
检查:python/paddle/incubate/nn/functional/fused_rms_norm.py
Related links