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

【PFCC】op开发提示没有注册kernel #41621

Closed
thunder95 opened this issue Apr 11, 2022 · 9 comments
Closed

【PFCC】op开发提示没有注册kernel #41621

thunder95 opened this issue Apr 11, 2022 · 9 comments
Assignees
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/following-up 跟进中 type/question 用户提问

Comments

@thunder95
Copy link
Contributor

请提出你的问题 Please ask your question

1141: RuntimeError: (NotFound) There are no kernels which are registered in the rrelu operator.
1141: [Hint: Expected kernels_iter != all_op_kernels.end(), but received kernels_iter == all_op_kernels.end().] (at /paddle/paddle/fluid/imperative/prepared_operator.cc:237)
1141: [operator < rrelu > error]

检查了PD_REGISTER_KERNEL, op_register这些文件, cpu和gpu注册都是有的,一般还会有什么原因造成这个错误?

@paddle-bot-old
Copy link

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

@sandyhouse
Copy link

可以参考Paddle源码里面其他op写写法,确认REGISTER_OP_xxx_KERNEL,REGISTER_OPERATOR这些宏是否调用,另外可以确认下对应的OP是否编译,建议清空编译目录,从头编译。(备注:一般不需要特殊处理,有些比较特殊的情况需要修改CMakeFile才会编译)

@thunder95
Copy link
Contributor Author

@sandyhouse 谢谢大佬解惑。REGISTER_OPERATOR确认已经调用, 已经参考其他OP写法, PD_REGISTER_KERNEL有用, REGISTER_OP_xxx_KERNEL没有使用, 感觉PD_REGISTER_KERNEL就够了吧

@thunder95
Copy link
Contributor Author

@sandyhouse 调用_C_ops.rrelu时出现问题,LayerHelper方式可以的

@sandyhouse
Copy link

方便提个pr看下吗?

@thunder95
Copy link
Contributor Author

@sandyhouse Built target 里面出现了这个kernel, 我再试着解决一下吧,实在不行就只有提pr辛苦你们了。

@Ligoml Ligoml added status/following-up 跟进中 and removed status/new-issue 新建 labels Apr 12, 2022
@thunder95
Copy link
Contributor Author

经过几天的代码研究和排查,仍旧没找到问题, 打印了一些日志,op和kernel确实是被注册的,但是最终的allopkernels确实打印出来没有我注册的op, 已经提交pr, 辛苦帮忙看一下 #41823

@thunder95 thunder95 changed the title op开发提示没有注册kernel 【PFCC】op开发提示没有注册kernel Apr 14, 2022
@Ligoml Ligoml added the PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc label Apr 15, 2022
@thunder95
Copy link
Contributor Author

已解决

@northeastsquare
Copy link

已解决

怎么解决的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PFCC Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc status/following-up 跟进中 type/question 用户提问
Projects
None yet
Development

No branches or pull requests

4 participants