Skip to content

Result not correct for complex hermitian generalized eigen problem (ZHEGVD) #108

@ajz34

Description

@ajz34

Hi FLAME devs!

It seems that when using ZHEGVD ($\mathbf{A} \boldsymbol{x} = \lambda \mathbf{B} \boldsymbol{x}$ in this case, corresponds to itype=1) subroutine in flame, the result seems not correct.

Minimal reproducible example refers to ajz34/issue-flame-zhegvd.

Numerical statement

a
[ 0.4967141530112327+0.5425600435859647j -0.1382643011711847-0.4634176928124623j  0.6476885381006925-0.4657297535702569j
  1.5230298564080254+0.2419622715660341j -0.234153374723336 -1.913280244657798j  -0.2341369569491805-1.7249178325130328j
  1.5792128155073915-0.5622875292409727j  0.7674347291529088-1.0128311203344238j -0.4694743859349521+0.3142473325952739j]
b
[ 1.3576924170122822+0.j                 -0.323380017801413 -0.2376316036052268j  0.5414063362623477-0.5959408793491383j
 -0.323380017801413 +0.2376316036052268j  0.8979017216901242+0.j                  0.2665855013651873+0.2610192531743049j
  0.5414063362623477+0.5959408793491383j  0.2665855013651872-0.261019253174305j   1.6252107235389968+0.j                ]
eigh A x = lambda B x, eigenvalues:
[-2.484839662098958  -0.8894810223570818  2.891093919244652 ]

Reproduction of this issue

Result from FLAME (seems not correct):

W: -1.99510617329178 -1.15859650658041 2.73917206915266 

Result from LAPACK (correct):

W: -2.48483966209896 -0.889481022357083 2.89109391924465 

Other status of this issue

  • This issue affects complex[double], but seems not related to double (subroutine DSYGVD seems correct).
  • This issue affects generalized eigen problem, but seems not related to non-generalized eigen problem (subroutine ZHEEVD seems correct).
  • This problem was found when we are developing rust-based tensor toolkit RSTSR, and using BLIS/FLAME DeviceBLIS as backend
  • By testing in RSTSR, some other subroutines that are commonly used (SVD, Cholesky, LU) and BLAS functions seems not affected, both double and complex[double].
  • I have not checked whether float (single) and complex[float] is also affected.
  • Building LAPACK with BLIS does not show erroneous results of ZHEGVD.
  • AMD AOCL FLAME seems not show erroneous results of ZHEGVD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions