You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2025-03-05 15:41:48.693059 test begin: paddle.isclose(Tensor([0, 10],"float64"), Tensor([0, 10],"float64"), rtol=1e-05, atol=1e-08, )
[cuda error] paddle.isclose(Tensor([0, 10],"float64"), Tensor([0, 10],"float64"), rtol=1e-05, atol=1e-08, )
(External) CUDA error(9), invalid configuration argument.
[Hint: 'cudaErrorInvalidConfiguration'. This indicates that a kernel launch is requesting resources that can never be satisfied by the current device. Requestingmore shared memory per block than the device supports will trigger this error, as will requesting too many threads or blocks.See cudaDeviceProp for more device limitations.] (at ../paddle/fluid/pybind/eager_functions.cc:1388)
前向修复:
a. 在Paddle代码中检索def isclose,发现isclose的核心实现调用的是_C_ops的isclose
b. 以_C_ops的isclose在paddle/phi/ops/yaml中检索,发现isclose的InferMeta函数使用到一个:
ValueCompareInferMeta
c. 在代码中检索ValueCompareInferMeta,并检查其dims(shape)的推导是否正确(在isclose中推导是正确因此不用修改)
d. 在paddle/phi/kernels中检索isclose,找全所有isclose的实现Kernel。发现共有四个涉及isclose的文件,分别为:
你的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.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Execute Infrastructure
PR Types
New features
Description
isclose Tensor.isclose支持0-Size。
修改历程介绍如下:
在PaddleAPITest report/0size_tensor中检索paddle.isclose的错误日志,发现CUDA error(9)报错。分析可能是前向过程出错。
前向修复:
a. 在Paddle代码中检索def isclose,发现isclose的核心实现调用的是_C_ops的isclose
b. 以_C_ops的isclose在paddle/phi/ops/yaml中检索,发现isclose的InferMeta函数使用到一个:
ValueCompareInferMeta
c. 在代码中检索ValueCompareInferMeta,并检查其dims(shape)的推导是否正确(在isclose中推导是正确因此不用修改)
d. 在paddle/phi/kernels中检索isclose,找全所有isclose的实现Kernel。发现共有四个涉及isclose的文件,分别为:
其中cc和cu文件均将前两个.h文件设为头文件,因此只用修改.h文件即可。而isclose_kernel.h和isclose_kernel_impl.h中不需要(不能)重复定义,故只修改了isclose_kernel_impl.h
在paddle/phi/kernels/impl/isclose_kernel_impl.h中加入以下代码,完成修复
添加单测:
在test/legacy_test/test_isclose_op.py中添加0 size tensor输入的单测:
备注:尽管所有的isclose的配置,accuracy均已通过,但是存在out没有alloc的问题