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

[cherry-pick] Replace Eigen with Lapack library for eigvals OP kernel #36038

Conversation

From00
Copy link
Contributor

@From00 From00 commented Sep 24, 2021

PR types

Function optimization

PR changes

OPs

Describe

cherry-pick (#35909)

This PR implements the kernel of "eigvals" OP with the Lapack library, which has a better performance than the previous Eigen library.

Here are some preliminary test results comparing between two library:
image

In general, for small-scale float32 matrices, the accuracy of Lapack implementation may slightly worse than that of Eigen in some cases. However, in most cases, Lapack implementation is closer to NumPy. And more crucially, in terms of computing time cost, Eigen is significantly slower than Lapack. Therefore, it is necessary to replace Eigen with Lapack library for linalg.eigvals OP.

@paddle-bot-old
Copy link

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

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@lanxianghit lanxianghit merged commit e9c0414 into PaddlePaddle:release/2.2 Sep 24, 2021
@From00 From00 deleted the cherry-replace-eigen-with-lapack-in-eigvals-kernel branch November 17, 2021 07:40
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