Does torch.nn.EmbeddingBag() use multi-threads (or multi-cores)?

Hi,

When I run an application which contains the function torch.nn.EmbeddingBag(), it seems the utilization of one particular core is high(above 90%) but the utilization of the others is not that high.

I wonder if or not EmbeddingBag() uses multi-threads (or multi-cores), when it does embedding look up.

Thanks.

1 Like

Hi,

Pytorch multi-thread usage is function dependent and workload dependent.
You would need to check the code for EmbeddingBag to check wether it uses multi-threading or not and if so, what is the threshold that is used to start using multiple threads.