linalg.eig and beta09 related changes#7
Merged
Merged
Conversation
shssf
reviewed
Sep 9, 2020
Comment on lines
+43
to
+52
| # DPNP sort val/vec by abs value | ||
| vvsort(dpnp_val, dpnp_vec, size) | ||
|
|
||
| # NP sort val/vec by abs value | ||
| vvsort(np_val, np_vec, size) | ||
|
|
||
| # NP change sign of vectors | ||
| for i in range(np_vec.shape[1]): | ||
| if np_vec[0, i] * dpnp_vec[0, i] < 0: | ||
| np_vec[:, i] = -np_vec[:, i] |
Contributor
There was a problem hiding this comment.
it is not quite clear why we need this code.
If you need to compare numpy and dpnp return values - no further changes needed in these arrays
shssf
reviewed
Sep 9, 2020
| res_vec[i] = in_array1[i] | ||
|
|
||
| if call_type == numpy.float64: | ||
| if call_type in [numpy.float64, numpy.int32, numpy.int64]: |
Contributor
There was a problem hiding this comment.
it looks like it might fails here. The kernel will treat data as double* (8 bytes) but real array contains int * (4 bytes)
shssf
reviewed
Sep 9, 2020
| @@ -42,55 +42,23 @@ void mkl_lapack_syevd_c(void* array_in, void* result1, size_t size) | |||
|
|
|||
| auto queue = DPNP_QUEUE; | |||
Contributor
|
is it possible to remove |
shssf
approved these changes
Sep 11, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I missed this PR
#5
beta9 is required for work with linalg.eig in any case.
Test shows issues and difference between current (mkl::lapack::syevd) and original implementations.
tests/test_linalg.py::test_eig_arange[2-float64] PASSED[ 5%]
tests/test_linalg.py::test_eig_arange[2-float32] PASSED[ 10%]
tests/test_linalg.py::test_eig_arange[2-int64] PASSED[ 15%]
tests/test_linalg.py::test_eig_arange[2-int32] PASSED[ 20%]
tests/test_linalg.py::test_eig_arange[4-float64] PASSED[ 25%]
tests/test_linalg.py::test_eig_arange[4-float32] FAILED[ 30%]
tests/test_linalg.py::test_eig_arange[4-int64] PASSED[ 35%]
tests/test_linalg.py::test_eig_arange[4-int32] PASSED[ 40%]
tests/test_linalg.py::test_eig_arange[8-float64] PASSED[ 45%]
tests/test_linalg.py::test_eig_arange[8-float32] FAILED[ 50%]
tests/test_linalg.py::test_eig_arange[8-int64] PASSED[ 55%]
tests/test_linalg.py::test_eig_arange[8-int32] PASSED[ 60%]
tests/test_linalg.py::test_eig_arange[16-float64] PASSED[ 65%]
tests/test_linalg.py::test_eig_arange[16-float32] FAILED[ 70%]
tests/test_linalg.py::test_eig_arange[16-int64] PASSED[ 75%]
tests/test_linalg.py::test_eig_arange[16-int32] PASSED[ 80%]
tests/test_linalg.py::test_eig_arange[300-float64] FAILED[ 85%]
tests/test_linalg.py::test_eig_arange[300-float32] FAILED[ 90%]
tests/test_linalg.py::test_eig_arange[300-int64] FAILED[ 95%]
tests/test_linalg.py::test_eig_arange[300-int32] FAILED[100%]