Thanks for your reply.
I mean when I run:
values = torch.arange(23, dtype=torch.uint8, device="cuda:0")

it creates a list with 23 values like you said: [0, 1, ..., 22].
So I wanted to test how many different combinations torch.combinations() returns when I increase the r value, which determines how many values are in a combination.
I get an error for values of r > 7 I think, which makes sense because it finds a lot of different combinations, which take up a lot of memory. But when I tested the function with r=23, I was surprised to get a CUDA out of memory error, since the list is 23 elements long and torch.combinations() should therefore just return the original list again. I tried it for a smaller list as well:
values = torch.arange(5)
combinations = torch.combinations(values, r=5)
# len(combinations) = 1

So I was wondering why I got an error with my first example.