All nn.Parameters and registered buffers will be moved to the device in .cuda()/.cpu() and .to() operations. This is also the case for self.L, S, U, however, self.P will remain on the CPU, since it’s neither a parameter nor buffer.
If you don’t want to train this tensor, use self.register_buffer("P", P) to register the tensor as a buffer.