I read this doc 2 and found that torch.set_num_threads and torch.set_num_interop_threads can only be called before running script model.
threads870×457 29.7 KB
Is there a way to control number of threads more flexibly in TorchScript that for a model’s different modules, we can set difference number of interop threads and introop threads to run?
Thanks for any answers!