set number of thread torch.set_num_threads(int) torch.get_num_threads() return current number of threads