-
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
Add new API cholesky_solve #38167
Add new API cholesky_solve #38167
Conversation
Thanks for your contribution! |
int *devInfo); | ||
|
||
template <> | ||
void cusolver_potrs<float>(const cusolverDnHandle_t &cusolverH, |
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.
shall we also support cusolver_potrs<platform::complex<float>> and cusolver_potrs<platform::complex<double>>?
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.
用于boardcast 输入Tensor的TensorExpand操作暂不支持复数,所以先不注册复数类型。底层代码逻辑实现考虑了复数情况。
ops::CholeskySolveKernel<paddle::platform::CPUDeviceContext, float>, | ||
ops::CholeskySolveKernel<paddle::platform::CPUDeviceContext, double>); |
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.
register kernel of platform::complex<float> and platform::complex<double> ?
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.
用于boardcast 输入Tensor的TensorExpand操作暂不支持复数,所以先不注册复数类型。底层代码逻辑实现考虑了复数情况。
ops::CholeskySolveGradKernel<paddle::platform::CPUDeviceContext, float>, | ||
ops::CholeskySolveGradKernel<paddle::platform::CPUDeviceContext, double>); |
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.
register kernel of platform::complex<float> and platform::complex<double> ?
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.
用于boardcast 输入Tensor的TensorExpand操作暂不支持复数,所以先不注册复数类型。底层代码逻辑实现考虑了复数情况。
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
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.
LG API
python/paddle/tensor/linalg.py
Outdated
.. code-block:: python | ||
|
||
import paddle | ||
import numpy as np |
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.
numpy 没用到。
python/paddle/tensor/linalg.py
Outdated
For more information, please refer to :ref:`api_guide_Name`. | ||
|
||
Returns: | ||
Tensor: The solution of the system of equations. Its data type should be the same as that of `x`. |
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.
should be
不对吧?这是返回的tensor。
7956212
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
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.
LG API
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 for the change of max_relative_error
PR types
New features
PR changes
APIs
Describe
Add new API cholesky_solve
备注:
修改op 反向测试精度原因:
线性代数相关API,反向实现通常由各种矩阵操作组合,这些操作依赖paddle底层Tensor操作,通常与numpy实现误差达不到1e-5的要求,这是线性代数共性问题。