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

Tests from toeplitz_cpu.py fail #8

Open
tahle opened this issue Oct 26, 2022 · 1 comment
Open

Tests from toeplitz_cpu.py fail #8

tahle opened this issue Oct 26, 2022 · 1 comment

Comments

@tahle
Copy link

tahle commented Oct 26, 2022

If I run toeplitz_cpu.py I get

[[ -8. -10.  -2.   8.]
 [  8.  -4.   6.  32.]]
[[-16. -20.  -4.  16.]
 [ 16.  -8.  12.  64.]]
[[8.8817842e-16 6.0000000e+00 1.6000000e+01 2.6000000e+01]
 [0.0000000e+00 1.2000000e+01 3.8000000e+01 6.6000000e+01]]
[[ 0.  6. 16. 26.]
 [ 0. 12. 38. 66.]]

The latter two matrices are equal, but the two first are off by a factor two.
These should be the same, since they are the outputs of

  print(toeplitz_mult(v, v, u))
  print(toeplitz_mult_slow(v, v, u))
@tahle
Copy link
Author

tahle commented Oct 26, 2022

This might be related to the division by 2 in the line

return krylov_out/2 if cycle else krylov_out

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

No branches or pull requests

1 participant