Skip to content

Commit

Permalink
Fixes compilation on gcc 10 (pytorch#441)
Browse files Browse the repository at this point in the history
Summary:
This does not work with gcc10, it fails with

```
FAILED: third_party/fbgemm/CMakeFiles/fbgemm_avx2.dir/src/FbgemmFP16UKernelsAvx2.cc.o
/usr/bin/c++ -DFBGEMM_STATIC -DTH_BLAS_MKL -I../third_party/cpuinfo/include -I../third_party/fbgemm/third_party/asmjit/src -I../third_party/fbgemm/include -I../third_party/fbgemm -I../cmake/../third_party/benchmark/include -isystem ../cmake/../third_party/googletest/googlemock/include -isystem ../cmake/../third_party/googletest/googletest/include -isystem ../third_party/protobuf/src -isystem /opt/intel/mkl/include -isystem ../third_party/gemmlowp -isystem ../third_party/neon2sse -isystem ../third_party/XNNPACK/include -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -O2 -g -DNDEBUG -fPIC -fvisibility=hidden -m64 -mavx2 -mf16c -mfma -std=c++14 -masm=intel -MD -MT third_party/fbgemm/CMakeFiles/fbgemm_avx2.dir/src/FbgemmFP16UKernelsAvx2.cc.o -MF third_party/fbgemm/CMakeFiles/fbgemm_avx2.dir/src/FbgemmFP16UKernelsAvx2.cc.o.d -o third_party/fbgemm/CMakeFiles/fbgemm_avx2.dir/src/FbgemmFP16UKernelsAvx2.cc.o -c ../third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc
In file included from ../third_party/fbgemm/src/././FbgemmFPCommon.h:11,
                 from ../third_party/fbgemm/src/./FbgemmFP16UKernelsAvx2.h:13,
                 from ../third_party/fbgemm/src/FbgemmFP16UKernelsAvx2.cc:7:
../third_party/fbgemm/include/fbgemm/FbgemmPackMatrixB.h: In member function ‘void fbgemm::PackedGemmMatrixB<T>::initializeParam()’:
../third_party/fbgemm/include/fbgemm/FbgemmPackMatrixB.h:77:18: error: ‘runtime_error’ is not a member of ‘std’
   77 |       throw std::runtime_error("Failed to initialize cpuinfo!");
      |                  ^~~~~~~~~~~~~
```

Pull Request resolved: pytorch#441

Reviewed By: jspark1105

Differential Revision: D24352664

Pulled By: jianyuh

fbshipit-source-id: c95654a99a4fdbdf6d7bf69a4e9acc33ff3aa110
  • Loading branch information
zasdfgbnm authored and facebook-github-bot committed Oct 16, 2020
1 parent abc56f6 commit f20d61e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/fbgemm/FbgemmPackMatrixB.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <typeinfo>
#include <vector>
#include <cpuinfo.h>
#include <stdexcept>

#include "Types.h"
#include "Utils.h"
Expand Down

0 comments on commit f20d61e

Please sign in to comment.