pytorch / FBGEMM

FB (Facebook) + GEMM (General Matrix-Matrix Multiplication) - https://code.fb.com/ml-applications/fbgemm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

C++ std not considered ?

kiufta opened this issue · comments

commented

I'm building this recipe with GCC:

-std=c++14 (or -11) is not getting passed at some point:

FAILED: third_party/fbgemm/CMakeFiles/fbgemm_generic.dir/src/GroupwiseConvAcc32Avx2.cc.o 
/usr/bin/ccache /usr/bin/c++ -DFBGEMM_STATIC -I./pytorch/third_party/cpuinfo/include -I./pytorch/third_party/fbgemm/third_party/asmjit/src -I./pytorch/third_party/fbgemm/include -I./pytorch/third_party/fbgemm -isystem ./pytorch/third_party/gemmlowp -isystem ./pytorch/third_party/neon2sse -isystem ./pytorch/third_party/XNNPACK/include -march=native -mtune=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection -Wp,-D_GLIBCXX_ASSERTIONS -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -Wall -Wextra -Werror -Wno-deprecated-declarations -O3 -DNDEBUG -fPIC -fvisibility=hidden -std=c++14 -MD -MT third_party/fbgemm/CMakeFiles/fbgemm_generic.dir/src/GroupwiseConvAcc32Avx2.cc.o -MF third_party/fbgemm/CMakeFiles/fbgemm_generic.dir/src/GroupwiseConvAcc32Avx2.cc.o.d -o third_party/fbgemm/CMakeFiles/fbgemm_generic.dir/src/GroupwiseConvAcc32Avx2.cc.o -c ./pytorch/third_party/fbgemm/src/GroupwiseConvAcc32Avx2.cc
In file included from ./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:10,
                 from ./pytorch/third_party/fbgemm/include/fbgemm/SimdUtils.h:9,
                 from ./pytorch/third_party/fbgemm/src/./CodeGenHelpers.h:9,
                 from ./pytorch/third_party/fbgemm/src/GroupwiseConvAcc32Avx2.cc:9:
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:47:37: error: 'int32_t' in namespace 'std' does not name a type
   47 | template <typename BIAS_TYPE = std::int32_t>
      |                                     ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:50:8: error: 'int32_t' in namespace 'std' does not name a type
   50 |   std::int32_t A_zero_point;
      |        ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:51:14: error: 'int32_t' in namespace 'std' does not name a type
   51 |   const std::int32_t* B_zero_point;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:52:8: error: 'int32_t' in namespace 'std' does not name a type
   52 |   std::int32_t C_zero_point;
      |        ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:54:14: error: 'int32_t' in namespace 'std' does not name a type
   54 |   const std::int32_t* row_offsets;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:55:14: error: 'int32_t' in namespace 'std' does not name a type
   55 |   const std::int32_t* col_offsets;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:57:8: error: 'uint32_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   57 |   std::uint32_t ncols;
      |        ^~~~~~~~
      |        wint_t
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:66:8: error: 'int32_t' in namespace 'std' does not name a type
   66 |   std::int32_t A_zero_point;
      |        ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:67:14: error: 'int32_t' in namespace 'std' does not name a type
   67 |   const std::int32_t* B_zero_point;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:70:14: error: 'int32_t' in namespace 'std' does not name a type
   70 |   const std::int32_t* row_offsets;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:71:14: error: 'int32_t' in namespace 'std' does not name a type
   71 |   const std::int32_t* col_offsets;
      |              ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/././UtilsAvx2.h:73:8: error: 'uint32_t' in namespace 'std' does not name a type; did you mean 'wint_t'?
   73 |   std::uint32_t ncols;
      |        ^~~~~~~~
      |        wint_t
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:231:39: error: 'int32_t' in namespace 'std' does not name a type
  231 | template <int SIZE, typename T = std::int32_t>
      |                                       ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:241:32: error: 'int32_t' in namespace 'std' does not name a type
  241 | template <typename accT = std::int32_t>
      |                                ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:306:10: error: 'std::int64_t' has not been declared
  306 |     std::int64_t total_work,
      |          ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:307:10: error: 'std::int64_t' has not been declared
  307 |     std::int64_t& start,
      |          ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:308:10: error: 'std::int64_t' has not been declared
  308 |     std::int64_t& end);
      |          ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:349:10: error: 'std::int64_t' has not been declared
  349 |     std::int64_t total_work,
      |          ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:351:10: error: 'std::int64_t' has not been declared
  351 |     std::int64_t& start,
      |          ^~~~~~~
./pytorch/third_party/fbgemm/include/fbgemm/./Utils.h:352:10: error: 'std::int64_t' has not been declared
  352 |     std::int64_t& end);
      |          ^~~~~~~

This has been addressed in both FBGEMM and FBGEMM_GPU, which now builds fully under the -std=c++17 flag being passed in. Feel free to re-file the ticket if you continue to observe this issue.