This error is expected since torch.long==torch.int64
corresponds to a max. value of 9223372036854775807
while your values are larger than this:
torch.iinfo(torch.long).max > 10239237003504588839
# False
Use torch.uint64
if you really need such large values:
indexedTst = [10239237003504588839, 9921686513378912864, 11901859001352538922, 4316640507316845735, 7162342725099726394, 17494803046312582752]
idxTensor = torch.tensor(indexedTst, dtype=torch.uint64)
print('idx',type(idxTensor),idxTensor)
# idx <class 'torch.Tensor'> tensor([10239237003504588839, 9921686513378912864, 11901859001352538922,
# 4316640507316845735, 7162342725099726394, 17494803046312582752],
# dtype=torch.uint64)
I would also be interested to learn more about your use case and when these indices are useful.