cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
96 Views
Registered: ‎09-23-2020

Errors in xf::solver gtsv (tri-diagonal matrix solver) compared to reference lapack implementation.

Hi, 

I'm trying to use the solver library (https://xilinx.github.io/Vitis_Libraries/solver/2020.1/guide_L2/L2_api.html#gtsv) to solve a tri-diagonal matrix system. I was getting some unexpected results when using the program for a non-trivial system size. Trying to compute the solution, in software emulation, with a system of size N=3136, I seem to get the solution in a jumbled order. I can easily verify if a found solution is actually correct, but when I do this I get large numerical errors. Still, I think the solution might be "correct, but jumbled", as the sum over the computed solution using the Xilinx solver library is very close to the sum over the solution using a reference lapack implementation (installed with apt-get liblapack-dev). 

I have written a small reference program the shows the problem using some random data, hosted on github: https://github.com/JoachimKoenigslieb/gtsv-problems The provide Makefile depends on lapack, which should be available as liblapack-dev from apt-get.

Is there some problem with the implementation, or is there some problem with my code? 

Thanks for any help you can provide me. 

Joachim Kønigslieb

0 Kudos
3 Replies
Highlighted
Moderator
Moderator
43 Views
Registered: ‎08-20-2018

Hi @j-koenigslieb 

I have not yet gone through your implementation, however, have you tested the below triangular solver function example?

https://github.com/Xilinx/Vitis_Libraries/tree/master/solver/L2/benchmarks/gtsv

 

 

 

 

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Highlighted
31 Views
Registered: ‎09-23-2020

I have yes! 

The problem can't be seen in that example for two important reasons: 

1. The system is extremely symmetric: The solution is the same for all the equations! Even if they would get shuffled, we would not be able to notice.
2. The gtsv function does not give weird results at such low sizes! 

Joachim

0 Kudos
Highlighted
Moderator
Moderator
17 Views
Registered: ‎08-20-2018

Hi @j-koenigslieb 

Can I use your repository to reproduce the issue?

What are the steps to be followed?

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos