How can I use LAPACK's ssteqr with torch.linalg module

Hi
I would like to implement ssteqr and ssytrd in the linalg backend representing implicit ql algorithm using MRRR and its symmetric matrix tri-diagonalization respectively. However, I cannot locate where to include this modifications.

subroutine ssteqr	(	character 	COMPZ,
integer 	N,
real, dimension( * ) 	D,
real, dimension( * ) 	E,
real, dimension( ldz, * ) 	Z,
integer 	LDZ,
real, dimension( * ) 	WORK,
integer 	INFO 
)	
subroutine ssytrd	(	character 	UPLO,
integer 	N,
real, dimension( lda, * ) 	A,
integer 	LDA,
real, dimension( * ) 	D,
real, dimension( * ) 	E,
real, dimension( * ) 	TAU,
real, dimension( * ) 	WORK,
integer 	LWORK,
integer 	INFO 
)	

Hi @ptrblck could you help me check this out, please?

Thanks in advance.

I’m not an expert in the CPU/LAPACK backend, but would assume you could define new methods in BatchLinearAlgebra.cpp and the corresponding header.

Thanks a lot sir @ptrblck . Would I need to rebuild the torch package to implement because I plan to implement the modification on a Jetson Nano device.

Yes, if you manipulate these files you would need to rebuild PyTorch from source.
Alternatively, you could try to write a custom extension as described here.