I cannot really see “the maximum index that can be contained in my input”. If or example:
emb = nn.Embedding(10, 3)
print(emb.weight.shape)
print(emb.weight)
input = torch.LongTensor([[1,2,4,5],[4,3,2,9],[2,3,4,5]])
print('input:', input.shape)
embo = emb(input)
print(embo.shape)
print('embo:',embo)

If I provide the input that has torch.Size([3,4]) elements the embedding output will have torch.Size([3, 4, 3]). So there is no reflection of 10 in the output.
I copied the example from the official document you pointed @albanD so we are on the same page.