Hello,
it would seem that you are looking for torch.set_num_threads 1.5k.
In ancient versions of pytorch (<0.3.1), there had been an issue with MKL threads 104 but that seems long solved.
Best regards
Thomas