Issue 1:
🐛 Bug

Master branch build failure

To Reproduce

git pull --rebase

git submodule sync --recursive

git submodule update --init --recursive

python setup.py develop

[3978/4367] Linking CXX executable bin/kernel_function_legacy_test

FAILED: bin/kernel_function_legacy_test

: && /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 && :

/opt/ai/forks/pytorch/build/lib/libtorch_cpu.so: undefined reference to `void fbgemm::CodeGenBase<unsigned char, signed char, int, int>::storeCRegs<asmjit::x86::Zmm, 64>(asmjit::x86::Emitter*, int, int, asmjit::x86::Gp, asmjit::x86::Gp, bool)'

collect2: error: ld returned 1 exit status

[3981/4367] Building CXX object test_jit/CMakeFiles/test_jit.dir/test_class_import.cpp.o

ninja: build stopped: subcommand failed.

Traceback (most recent call last):

File "setup.py", line 737, in

build_deps()

File "setup.py", line 321, in build_deps

cmake=cmake)

File "/opt/ai/forks/pytorch/tools/build_pytorch_libs.py", line 62, in build_caffe2

cmake.build(my_env)

File "/opt/ai/forks/pytorch/tools/setup_helpers/cmake.py", line 345, in build

self.run(build_args, my_env)

File "/opt/ai/forks/pytorch/tools/setup_helpers/cmake.py", line 141, in run

check_call(command, cwd=self.build_dir, env=env)

File "/home/v70786/anaconda3/lib/python3.7/subprocess.py", line 363, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '4']' returned non-zero exit status 1.

Expected behavior

Build Should succeed

Environment

Collecting environment information...

PyTorch version: N/A

Is debug build: N/A

CUDA used to build PyTorch: N/A

OS: Ubuntu 18.04.4 LTS

GCC version: (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0

CMake version: version 3.10.2

Python version: 3.7

Is CUDA available: N/A

CUDA runtime version: Could not collect

GPU models and configuration: Could not collect

Nvidia driver version: Could not collect

cuDNN version: Could not collect

Versions of relevant libraries:

[pip] numpy==1.18.1

[pip] numpydoc==0.9.2

[pip] torchvision==0.6.1

[conda] blas 1.0 mkl

[conda] mkl 2020.0 166

[conda] mkl-service 2.3.0 py37he904b0f_0

[conda] mkl_fft 1.0.15 py37ha843d7b_0

[conda] mkl_random 1.1.0 py37hd6b4f25_0

[conda] numpy 1.18.1 py37h4f9e942_0

[conda] numpy-base 1.18.1 py37hde5b4d6_1

[conda] numpydoc 0.9.2 py_0

[conda] torchvision 0.6.1 pypi_0 pypi

cc @suo @gmagogsfm

Issue 2:
🐛 Bug

This is a build regression within last few days.

We got undefined reference void fbgemm::CodeGenBase<unsigned char, signed char, int, int>::storeCRegs<asmjit::x86::Zmm, 64>(asmjit::x86::Emitter*, int, int, asmjit::x86::Gp, asmjit::x86::Gp, bool)

Since there's an fbgemm update 2 days ago, that could be the reason.

#42302

Environment

PyTorch Version (e.g., 1.0): master

OS (e.g., Linux): Ubuntu 18.04

How you installed PyTorch (conda, pip, source): source

Build command you used (if compiling from source): cmake+ninja+gcc-8

CUDA/cuDNN version: 11/8

cc @ezyang @gchanan @zou3519 @malfet