Getting `Unknown qengine` error when using quantized model in a VM

Shisho_Sama: <p>Hello everyone, hope you are all having a great day.<br>
I have been building and running my quantized models just fine until now that I have tried to build and execute my tests in a VM.<br>
Whenever I try to load a quantized model I face errors such as the following :</p>
<pre><code class="lang-auto">An exception has occured in 'class MTCNNImpl * __ptr64' : Unknown qengine
Exception raised from operator () at C:\Users\User\pytorch-1.7.0\aten\src\ATen\native\quantized\cpu\fbgemm_utils.cpp:308 (most recent call first):
00007FFD83E3F86800007FFD83E3F800 c10.dll!c10::Error::Error [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4DCE40B400007FFD4DCE2D30 torch_cpu.dll!at::QTensorImpl::operator= [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4DCE442200007FFD4DCE2D30 torch_cpu.dll!at::QTensorImpl::operator= [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4DCE6C0500007FFD4DCE2D30 torch_cpu.dll!at::QTensorImpl::operator= [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4DCE6EBF00007FFD4DCE2D30 torch_cpu.dll!at::QTensorImpl::operator= [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC69D3B00007FFD4FC5E5D0 torch_cpu.dll!torch::jit::registerOperator [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6AB6200007FFD4FC5E5D0 torch_cpu.dll!torch::jit::registerOperator [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4F25A8AC00007FFD4F256C30 torch_cpu.dll!torch::jit::TypeNameUniquer::getUniqueName [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4F25DE3800007FFD4F25CCE0 torch_cpu.dll!torch::jit::Unpickler::readInstruction [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4F260FA000007FFD4F260ED0 torch_cpu.dll!torch::jit::Unpickler::run [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4F25B71200007FFD4F25B6E0 torch_cpu.dll!torch::jit::Unpickler::parse_ivalue [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6DD4300007FFD4FC6D950 torch_cpu.dll!torch::jit::readArchiveAndTensors [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6D91F00007FFD4FC6C050 torch_cpu.dll!torch::jit::load [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6B49200007FFD4FC5E5D0 torch_cpu.dll!torch::jit::registerOperator [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6C20300007FFD4FC6C050 torch_cpu.dll!torch::jit::load [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD4FC6C03B00007FFD4FC6BFC0 torch_cpu.dll!torch::jit::load [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFD83BBAC1B00007FFD83BBA830 Detector_MTCNN.dll!MTCNNImpl::MTCNNImpl [D:\cpp_port\Detector_MTCNN\MTCNN.cpp @ 481]
00007FFD83BC815000007FFD83BC8010 Detector_MTCNN.dll!MTCNN::MTCNN [D:\cpp_port\Detector_MTCNN\MTCNN.cpp @ 1645]
00007FF6E13D46A000007FF6E13D44D0 Detector_MTCNN_Test.exe!test19 [D:\cpp_port\Detector_MTCNN_Test\Detector_MTCNN_Test.cpp @ 744]
00007FF6E13D522000007FF6E13D4E90 Detector_MTCNN_Test.exe!main [D:\cpp_port\Detector_MTCNN_Test\Detector_MTCNN_Test.cpp @ 941]
00007FF6E13F01F000007FF6E13F00E4 Detector_MTCNN_Test.exe!__scrt_common_main_seh [d:\agent\_work\63\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl @ 288]
00007FFDAEAD7C2400007FFDAEAD7C10 KERNEL32.DLL!BaseThreadInitThunk [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
00007FFDB00AD4D100007FFDB00AD4B0 ntdll.dll!RtlUserThreadStart [&lt;unknown file&gt; @ &lt;unknown line number&gt;]
</code></pre>
<p>What am I missing here? I mean what prerequisite(especially hardware related such as instruction sets, etc) is needed that’s missing here and is thus causing this exception? my vm runs on an old Intel® Xeon® CPU E5-2630 v2 @ 2.60GHz by the way)</p>
<p>Thanks a lot in advance</p>

Shisho_Sama: <p>OK, I guess I found the culprit.<br>
I built fbgemm on my local system which has avx2 support. but my vm CPU only supports avx instruction set and that’s why all hell breaks loose!</p>
<blockquote>
<p>FBGEMM requires gcc 5+ and a CPU with support for avx2 instruction set or higher</p>
</blockquote>
<p>Thanks everyone!</p>