Training network 10 time slower on 16core vs 8core C++ API

rilesdg3: <p>Hello</p>
<p>Pytorch seems to run 10 times slower on a 16 core machine vs 8 core machine. Any thoughts on why that<br>
is and what/if any thing I can do to speed up the 16 core machine? Thank you</p>
<p>Below is a list of details in the order in which you find them.</p>
<ol>
<li>16 core pytorch env</li>
<li>16 core lscpu</li>
<li>8 core pytroch evn</li>
<li>8 core lscpu</li>
<li>16 core CMake Cache, can be made avaible</li>
<li>8 core CMake Cache, can be made avaible</li>
</ol>
<p>Pytorch was built from source on both 16 core and 8 core</p>
<details>
<summary>16Core Details</summary>
<p>PyTorch version: 1.7.0+cpu<br>
Is debug build: True<br>
CUDA used to build PyTorch: None<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Ubuntu 18.04.4 LTS (x86_64)<br>
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0<br>
Clang version: Could not collect<br>
CMake version: version 3.10.2</p>
<p>Python version: 3.6 (64-bit runtime)<br>
Is CUDA available: False<br>
CUDA runtime version: No CUDA<br>
GPU models and configuration: No CUDA<br>
Nvidia driver version: No CUDA<br>
cuDNN version: No CUDA<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.19.4<br>
[pip3] torch==1.7.0+cpu<br>
[pip3] torchvision==0.4.2<br>
[conda] Could not collect</p>
<p>Architecture:                    x86_64<br>
CPU op-mode(s):                  32-bit, 64-bit<br>
Byte Order:                      Little Endian<br>
Address sizes:                   46 bits physical, 48 bits virtual<br>
CPU(s):                          16<br>
On-line CPU(s) list:             0-15<br>
Thread(s) per core:              1<br>
Core(s) per socket:              8<br>
Socket(s):                       2<br>
NUMA node(s):                    2<br>
Vendor ID:                       GenuineIntel<br>
CPU family:                      6<br>
Model:                           45<br>
Model name:                      Intel(R) Xeon(R) CPU E5-2690 0 @ 2.90GHz<br>
Stepping:                        7<br>
CPU MHz:                         2700.057<br>
CPU max MHz:                     2900.0000<br>
CPU min MHz:                     1200.0000<br>
BogoMIPS:                        5799.68<br>
Virtualization:                  VT-x<br>
L1d cache:                       512 KiB<br>
L1i cache:                       512 KiB<br>
L2 cache:                        4 MiB<br>
L3 cache:                        40 MiB<br>
NUMA node0 CPU(s):               0,2,4,6,8,10,12,14<br>
NUMA node1 CPU(s):               1,3,5,7,9,11,13,15<br>
Vulnerability Itlb multihit:     KVM: Vulnerable<br>
Vulnerability L1tf:              Mitigation; PTE Inversion<br>
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT disabled<br>
Vulnerability Meltdown:          Mitigation; PTI<br>
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp<br>
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and _<em>user pointer sanitization<br>
Vulnerability Spectre v2:        Mitigation; Full generic retpoline, IBPB conditional, IBRS_FW, RSB filling<br>
Vulnerability Srbds:             Not affected<br>
Vulnerability Tsx async abort:   Not affected<br>
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acp<br>
i mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon<br>
pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 ds</em><br>
cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadl<br>
ine_timer aes xsave avx lahf_lm pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority e<br>
pt vpid xsaveopt dtherm arat pln pts md_clear flush_l1d</p>
</details>
<details>
<summary>8Core Details</summary>
<p>PyTorch version: 1.7.0+cpu<br>
Is debug build: True<br>
CUDA used to build PyTorch: None<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Ubuntu 18.04.4 LTS (x86_64)<br>
GCC version: (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0<br>
Clang version: Could not collect<br>
CMake version: version 3.10.2</p>
<p>Python version: 3.6 (64-bit runtime)<br>
Is CUDA available: False<br>
CUDA runtime version: No CUDA<br>
GPU models and configuration: No CUDA<br>
Nvidia driver version: No CUDA<br>
cuDNN version: No CUDA<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.19.4<br>
[pip3] torch==1.7.0+cpu<br>
[pip3] torchvision==0.4.2<br>
[conda] Could not collect</p>
<p>Architecture:        x86_64<br>
CPU op-mode(s):      32-bit, 64-bit<br>
Byte Order:          Little Endian<br>
CPU(s):              8<br>
On-line CPU(s) list: 0-7<br>
Thread(s) per core:  2<br>
Core(s) per socket:  4<br>
Socket(s):           1<br>
NUMA node(s):        1<br>
Vendor ID:           GenuineIntel<br>
CPU family:          6<br>
Model:               58<br>
Model name:          Intel(R) Core™ i7-3740QM CPU @ 2.70GHz<br>
Stepping:            9<br>
CPU MHz:             3491.793<br>
CPU max MHz:         3700.0000<br>
CPU min MHz:         1200.0000<br>
BogoMIPS:            5387.33<br>
Virtualization:      VT-x<br>
L1d cache:           32K<br>
L1i cache:           32K<br>
L2 cache:            256K<br>
L3 cache:            6144K<br>
NUMA node0 CPU(s):   0-7<br>
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm cpuid_fault epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms xsaveopt dtherm ida arat pln pts md_clear flush_l1d</p>
</details>

rilesdg3: <p>The solution can be found <a href="https://datascience.stackexchange.com/questions/93427/training-network-10-time-slower-on-16core-vs-8core-c-api" rel="noopener nofollow ugc">here</a></p>