Thank you @anantguptadbl!
I know that I can use rcond but in this case it will give me all orthogonal basis which I don’t want.
I just figured the problem, in case of anyone experiences this problem, the tensor sw_bar_tensor was  of type of float64 and for some reason when you convert it to lower type (e.g., float 32, float 16) it will work.