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

fix matrix_inverse_op with rocm #32128

Merged
merged 4 commits into from
Apr 14, 2021
Merged

Conversation

Ray2020BD
Copy link
Contributor

@Ray2020BD Ray2020BD commented Apr 7, 2021

PR types

Bug fixes

PR changes

OPs

Describe

fix matrix_inverse_op with rocm
image

@paddle-bot-old
Copy link

paddle-bot-old bot commented Apr 7, 2021

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

#endif
#ifdef PADDLE_WITH_HIP
template <typename T>
class MatrixInverseFunctor<platform::CUDADeviceContext, T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

和CPU同样的实现,代码不用重复一遍。把Eigen版本作为默认实现就行。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

#include "paddle/fluid/framework/tensor.h"
#include "paddle/fluid/platform/device_context.h"

namespace paddle {
namespace operators {
namespace math {

template <typename DeviceContext, typename T>
void compute_inverse_eigen(const DeviceContext& context,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

函数命名用AxxBxx这种大小写驼峰式命名,后续PR改下吧。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的

@qili93 qili93 merged commit 995b5f2 into PaddlePaddle:develop Apr 14, 2021
@Ray2020BD Ray2020BD deleted the rocm_post_fix_1 branch April 14, 2021 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants