backscrub icon indicating copy to clipboard operation
backscrub copied to clipboard

compile with gcc-11

Open gled-rs opened this issue 4 years ago • 4 comments

More of a notes than an issue but at this point tensorflow does not compile with gcc 11, so if needed here are the notes on how to compile.

Changes needed:

mkdir build
cd build
cmake ../

then in:

  • abseil-cpp/absl/synchronization/internal/graphcycles.h and ruy/ruy/block_map.h add at the top:
 #include <limits>
 #include <stdexcept>
  • xnnpack/src/xnnpack/intrinsics-polyfill.h replace line 15 : #if (defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)) || \ by #if (defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && __GNUC__ < 11) || \

gled-rs avatar Jun 25 '21 21:06 gled-rs

Care to upstream those comments to the TensorFlow guys? Just in case there aren't open issues for those two changes there yet.

BenBE avatar Jun 26 '21 09:06 BenBE

Care to upstream those comments to the TensorFlow guys? Just in case there aren't open issues for those two changes there yet.

they are well aware of the compile issue, that is where I found the workaround ( split in 2 different sources ).

I just thought of adding the note here to save some time for someone who would like to compile with gcc11 ( arch users for example ).

gled-rs avatar Jun 28 '21 15:06 gled-rs

Is this still an issue for newer Tensorflow versions? We're on 2.8.0 at present.

phlash avatar Aug 24 '22 10:08 phlash

AFAIR we now got problems with GCC 12, cf. #145 …

BenBE avatar Aug 24 '22 11:08 BenBE