<h2 dir="auto"><g-emoji class="g-emoji" alias="bug" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png">🐛</g-emoji> Bug</h2>
<p dir="auto">Master branch build failure</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">git pull --rebase<br>
git submodule sync --recursive<br>
git submodule update --init --recursive</p>
<p dir="auto">python setup.py develop</p>
<p dir="auto">[3978/4367] Linking CXX executable bin/kernel_function_legacy_test<br>
FAILED: bin/kernel_function_legacy_test<br>
: &amp;&amp; /usr/bin/c++  -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DUSE_VULKAN_WRAPPER -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow -DHAVE_AVX_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG  -rdynamic caffe2/CMakeFiles/kernel_function_legacy_test.dir/__/aten/src/ATen/core/boxing/impl/kernel_function_legacy_test.cpp.o  -o bin/kernel_function_legacy_test  -Wl,-rpath,/opt/ai/forks/pytorch/build/lib: lib/libgtest_main.a -Wl,--no-as-needed,/opt/ai/forks/pytorch/build/lib/libtorch.so -Wl,--as-needed -Wl,--no-as-needed,/opt/ai/forks/pytorch/build/lib/libtorch_cpu.so -Wl,--as-needed lib/libprotobuf.a lib/libc10.so lib/libdnnl.a -ldl lib/libgtest.a -pthread &amp;&amp; :<br>
/opt/ai/forks/pytorch/build/lib/libtorch_cpu.so: undefined reference to `void fbgemm::CodeGenBase&lt;unsigned char, signed char, int, int&gt;::storeCRegs&lt;asmjit::x86::Zmm, 64&gt;(asmjit::x86::Emitter*, int, int, asmjit::x86::Gp, asmjit::x86::Gp, bool)'<br>
collect2: error: ld returned 1 exit status<br>
[3981/4367] Building CXX object test_jit/CMakeFiles/test_jit.dir/test_class_import.cpp.o<br>
ninja: build stopped: subcommand failed.<br>
Traceback (most recent call last):<br>
File "setup.py", line 737, in <br>
build_deps()<br>
File "setup.py", line 321, in build_deps<br>
cmake=cmake)<br>
File "/opt/ai/forks/pytorch/tools/build_pytorch_libs.py", line 62, in build_caffe2<br>
cmake.build(my_env)<br>
File "/opt/ai/forks/pytorch/tools/setup_helpers/cmake.py", line 345, in build<br>
self.run(build_args, my_env)<br>
File "/opt/ai/forks/pytorch/tools/setup_helpers/cmake.py", line 141, in run<br>
check_call(command, cwd=self.build_dir, env=env)<br>
File "/home/v70786/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call<br>
raise CalledProcessError(retcode, cmd)<br>
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 1.</p>
<h2 dir="auto">Expected behavior</h2>
<p dir="auto">Build Should succeed</p>
<h2 dir="auto">Environment</h2>
<p dir="auto">Collecting environment information...<br>
PyTorch version: N/A<br>
Is debug build: N/A<br>
CUDA used to build PyTorch: N/A</p>
<p dir="auto">OS: Ubuntu 18.04.4 LTS<br>
GCC version: (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0<br>
CMake version: version 3.10.2</p>
<p dir="auto">Python version: 3.7<br>
Is CUDA available: N/A<br>
CUDA runtime version: Could not collect<br>
GPU models and configuration: Could not collect<br>
Nvidia driver version: Could not collect<br>
cuDNN version: Could not collect</p>
<p dir="auto">Versions of relevant libraries:<br>
[pip] numpy==1.18.1<br>
[pip] numpydoc==0.9.2<br>
[pip] torchvision==0.6.1<br>
[conda] blas                      1.0                         mkl<br>
[conda] mkl                       2020.0                      166<br>
[conda] mkl-service               2.3.0            py37he904b0f_0<br>
[conda] mkl_fft                   1.0.15           py37ha843d7b_0<br>
[conda] mkl_random                1.1.0            py37hd6b4f25_0<br>
[conda] numpy                     1.18.1           py37h4f9e942_0<br>
[conda] numpy-base                1.18.1           py37hde5b4d6_1<br>
[conda] numpydoc                  0.9.2                      py_0<br>
[conda] torchvision               0.6.1                    pypi_0    pypi</p>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/suo/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/suo">@suo</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gmagogsfm/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gmagogsfm">@gmagogsfm</a></p>
<h2 dir="auto">🐛 Bug</h2>
<p dir="auto">This is a build regression within last few days.<br>
We got undefined reference <code class="notranslate">void fbgemm::CodeGenBase&lt;unsigned char, signed char, int, int&gt;::storeCRegs&lt;asmjit::x86::Zmm, 64&gt;(asmjit::x86::Emitter*, int, int, asmjit::x86::Gp, asmjit::x86::Gp, bool)</code></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5203025/89109182-7a82b200-d471-11ea-90e8-66d0adb25120.png"><img width="1064" alt="image" src="https://user-images.githubusercontent.com/5203025/89109182-7a82b200-d471-11ea-90e8-66d0adb25120.png" style="max-width: 100%;"></a></p>
<p dir="auto">Since there's an fbgemm update 2 days ago, that could be the reason.<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="668682851" data-permission-text="Title is private" data-url="https://github.com/pytorch/pytorch/issues/42302" data-hovercard-type="pull_request" data-hovercard-url="/pytorch/pytorch/pull/42302/hovercard" href="https://github.com/pytorch/pytorch/pull/42302">#42302</a></p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>PyTorch Version (e.g., 1.0): master</li>
<li>OS (e.g., Linux): Ubuntu 18.04</li>
<li>How you installed PyTorch (<code class="notranslate">conda</code>, <code class="notranslate">pip</code>, source): source</li>
<li>Build command you used (if compiling from source): cmake+ninja+gcc-8</li>
<li>CUDA/cuDNN version: 11/8</li>
</ul>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/ezyang/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/ezyang">@ezyang</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/gchanan/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/gchanan">@gchanan</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zou3519/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zou3519">@zou3519</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/malfet/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/malfet">@malfet</a></p>