-
Notifications
You must be signed in to change notification settings - Fork 5.8k
【Hackathon 3rd No.2】 add new API paddle.iinfo #44797
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 3rd No.2】 add new API paddle.iinfo #44797
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
✅ This PR's description meets the template requirements! |
finfo并没有复杂计算过程,只是获取常量信息,所以不需要实现为一个算子,并且Paddle算子目前只能返回Tensor类型,无法做到和numpy返回类型一致。你需要解决的问题是,如何用C++实现一个获取数值信息类,实现相关方法,并绑定到Python(如pybind, cpython,了解其中一种即可)。 |
收到,我研究下。 |
1.Extending and Embedding the Python Interpreter (学习耗时5天) you can learn it when you have time: |
使用pybind11,可以将python 类型和C++ 类型写在同一个C++文件中 |
pybind11 exposes Python types and functions using thin C++ wrappers, which makes it possible to conveniently call Python code from C++ without resorting to Python’s C API. https://pybind11.readthedocs.io/en/stable/advanced/pycpp/index.html |
已经阅读的源码行数: |
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
New features
PR changes
APIs
Describe
add new API paddle.iinfo