-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
【Hackathon 4th No.27】为 Paddle 新增 paddle.sparse.concat 稀疏 API #53872
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
❌ The PR is not created using PR's template. You can refer to this Demo. |
sparse_concat在静态图中调用时,报错:
根据日志输出判断,是在paddle\fluid\framework\operator.cc中,函数 GetExpectedPhiKernelArgs 语句 return (*arg_map_fn_)(arg_mapping_ctx); 中出错。 请问报错函数(文件paddle\fluid\framework\operator.cc中函数 InputVar),是在哪里被调用的? |
这个问题需要加一些LOG信息来定位InputVar的具体调用位置,有可能是已经进入到了SparseConcatOpArgumentMapping中并调用了IsSparseCooTensorInput之类的函数。 |
上面说的报错位置,就是通过增加LOG信息找到的。 |
Sorry to inform you that 63bbbc7's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually. |
@lijingkai2023 你好,由于CPU kernel已经跑通了,GPU kernel应该是kernel中的问题,具体有什么报错吗 |
@zhwesky2010 具体报错如下:
|
是的,可以进入,增加的log日志输出了。 |
@lijingkai2023 你好,静态图调用报错是由于目前生成时还有些机制问题。对于sparse算子任务来说当前也可以只做动态图的,因为算子都是动静复用的,静态图的单测目前也可以先不用写了。 动态图yaml生成这里我看你已经弄好了,因为CPU可以跑了,GPU 是纯kernel问题,和静态图无关,具体是ddim的CopyFrom这个函数,应该是触发了访问越界导致segment fault,所以还需要修一下ConcatCooKernel这个函数,属于任务的范围。 |
好的 |
self.check_result(i, [2, 3, 4, 2, 3, 4, 2, 3, 4], j + 1, 'coo') | ||
|
||
|
||
# class TestSparseConcatStatic(unittest.TestCase): |
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.
静态图单测目前可以先不用管了
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.
好的
} | ||
|
||
template <typename T, typename Context> | ||
void ConcatCooKernel(const Context &dev_ctx, |
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.
具体是这个函数里有触发访问越界报错的问题
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.
已修改
1a99070
to
0b1086b
Compare
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
New features
PR changes
APIs
Description
完成第四期第24项目开发任务: /~https://github.com/PaddlePaddle/community/blob/master/hackthon_4th/%E3%80%90PaddlePaddle%20Hackathon%204%E3%80%91%20%E6%A0%B8%E5%BF%83%E6%A1%86%E6%9E%B6%E5%BC%80%E6%BA%90%E8%B4%A1%E7%8C%AE%20API%20%E5%BC%80%E5%8F%91%E4%BB%BB%E5%8A%A1%E5%90%88%E9%9B%86.md#task27
1、增加 以稀疏矩阵列表为参数,自动生成动态图代码和注册逻辑(由于concat的第一个参数是稀疏矩阵列表,paddle框架当前不支持)
2、新增 paddle.sparse.concat 稀疏 API
RFC设计文档: PaddlePaddle/community#504
中文api文档:PaddlePaddle/docs#5886
[used AI Studio] 完成: c++算子以稀疏矩阵列表为参数,注册逻辑;GPU编译测试