Ho right my bad. the legacy api with capital letters does not support this.
The new api for this is: torch.empty([7, 32, 32], dtype=torch.float, device="cuda") (keep in mind that the returned Tensor (like with the old api) contains uninitialized memory).