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
MKL fixes #4523
MKL fixes #4523
Conversation
If there are any Eigen experts around it would be nice to know what is going wrong here so we can file a ticket at Eigen. From what I can gather is that unary functions (power and sqrt) are not being properly evaluated lazily and have to be force evaluated for these code snippets to work. In any case I can run all the tests fine with MKL now, |
same issue here. Unary function evaluation has to be forced otherwise the array shape is not passed along fixed indent
@@ -66,8 +66,11 @@ void CSOBI::fit_dense(CDenseFeatures<float64_t>* features) | |||
MatrixXd M0 = cor(EX,int(m_tau[0])); | |||
EigenSolver<MatrixXd> eig; | |||
eig.compute(M0); | |||
MatrixXd SPH = (eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix().cwiseSqrt() * eig.pseudoEigenvectors ().transpose()).inverse(); | |||
MatrixXd spx = SPH*EX; | |||
MatrixXd EVMsqrt = eig.pseudoEigenvalueMatrix().cwiseSqrt(); |
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.
just asking, is this covered by any tests that would detect changing results?
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 covered here. That's how I found these bugs!
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.
Is there a buildbot for MKL backend btw?
Add one to azure :)
… On 14 Feb 2019, at 10:24, Gil ***@***.***> wrote:
@gf712 commented on this pull request.
In src/shogun/converter/ica/SOBI.cpp:
> @@ -66,8 +66,11 @@ void CSOBI::fit_dense(CDenseFeatures<float64_t>* features)
MatrixXd M0 = cor(EX,int(m_tau[0]));
EigenSolver<MatrixXd> eig;
eig.compute(M0);
- MatrixXd SPH = (eig.pseudoEigenvectors() * eig.pseudoEigenvalueMatrix().cwiseSqrt() * eig.pseudoEigenvectors ().transpose()).inverse();
- MatrixXd spx = SPH*EX;
+ MatrixXd EVMsqrt = eig.pseudoEigenvalueMatrix().cwiseSqrt();
Is there a buildbot for MKL backend btw?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
OK! Just for GCC should be fine right? Might need some help setting it up. |
Yep but use clang as its faster compiling;)
I’ll b on irc in a bit
… On 14 Feb 2019, at 10:33, Gil ***@***.***> wrote:
Add one to azure :)
…
OK! Just for GCC should be fine right? Might need some help setting it up.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yup! |
I am not sure what causes this issue, but somehow separating evaluation of unary functions from the main expression fixes the issue.
I did some debugging and it seems like for example the square root operation of a matrix (
.cwiseSqrt()
) makes its rows and cols attributes be 0, which then causes an assertion error when this matrix is used in another operation.This only happens with MKL backend and is first reported in #3992