For me the tensor is certainly cast.
torch.randn(5).half()
tensor([ 0.1776,  0.1658,  0.0118, -0.0336, -0.1261], dtype=torch.float16)

torch.randn(5, device='cuda').half()
tensor([ 0.5459,  0.3481, -1.5215, -0.3481,  0.2035], device='cuda:0',
       dtype=torch.float16)

What the sentence you quote means is that when the input (self) already has the desired type / device, then you are getting the same tensor, not a copy (while when a cast is needed, that necessarily implies copying).
Best regards
Thomas