-
Notifications
You must be signed in to change notification settings - Fork 267
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 5th No.37】为 Paddle 新增 householder_product API #703
Conversation
|
||
# 五、设计思路与实现方案 | ||
|
||
在 Paddle repo 的 python/paddle/linalg.py 文件中直接实现 |
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.
(1)是否需要build paddle with lapack support?(2)scipy算法库scipy.linalg.lapack中是否包含所需的function?
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.
辛苦review~
- 我当时看提交内容提到直接写py的API,所以之前的pr是直接在python层手动实现了lapack中的算法逻辑(当然py效率应该会比直接cpp调用lapack接口差),您是建议在cpp层引入lapack的方法来实现嘛?BTW,pytorch是cpp层统一调了lapack来做
householder_product
和linalg_qr
,paddle目前对linalg.qr
的实现是:CPU的kernel调的是eigen,GPU的kernel调的是cusolve,如果又引入lapack会不会有点太杂。对于如何实现这个householder_product
有什么建议嘛? - 对的,
scipy.linalg.lapack
有相应的实现,接口是直接用的orgqr
这种lapack包名,之前只搜了一下householder
关键字没注意,sry,稍后在rfc中补上~
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.
可以在python层实现,就是确定一下scipy中是不是有lapack的完整实现,那这样的话直接调包可以吗
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.
可以在python层实现,就是确定一下scipy中是不是有lapack的完整实现,那这样的话直接调包可以吗
scipy是直接调lapack的。
看了下paddle中确实有直接调用lapack包实现一些代数计算功能,在这里引入外部lapack,如果更建议直接调包而不是python层实现的话,应该可以在这里引入一下然后封装成lapack_function,然后householder_product在cpp层写个算子直接调用这个lapack_function,感觉应该也ok
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.
python层实现,或者cpp层算子实现其功能都可以,不过python层可以实现的话似乎更简捷一些,可以把这些方案写到RFC里面。
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.
python层实现,或者cpp层算子实现其功能都可以,不过python层可以实现的话似乎更简捷一些,可以把这些方案写到RFC里面。
OK,已添加,辛苦review~
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.
LGTM
No description provided.