Using a single threads on ARM CPU

Hi guys,

I’m trying to inference my model with a single core. but it seems not working

Pytorch : 1.5.0
Platform: Nvidia Jetson Xavier
Tried: os.sched_setaffinity, torch.set_num_threads

when I get the result with os.sched_getaffinity and torch.get_num_threads, both shows only 1threads and 1 core affinity output but with htop, it shows using 8 cores.

can I get any advice?

Hi guys,

I think I found the problem.
Setting threads number was working correctly

The reason why htop tell me that 8 cores been utilized is because of DataLoader
I didn’t set num_workers as 1.

so after set num_workers as 1 it works fine.