I’m a little confused about how torch.set_num_threads should be used.
I have a function that imports torch, loads a model, and generates predictions from that model.
I want to call my function across several cores, using multiprocessing.pool.
Do I want to set_num_threads inside my function? Or in the script that calls multiprocessing.pool? Additionally, I’m a bit confused because torch.get_num_threads returns 1, before I’ve actually called set_num_threads. Does this mean setting to 1 is unneeded?