Ho right. The use of multiple cores on CPU can be switched off with torch.set_num_threads() but that will significantly slow down your program.
And even that is not guaranteed to solve all the issues as we never implement the batch implementation as just a for loop over the batch. That would be very very slow.