Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-8166

[C++] AVX512 intrinsics fail to compile with clang-8 on Ubuntu 18.04

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • C++

    Description

      cc frank.du

      I have an i9-9960X AVX512-capable CPU but I see

      /usr/bin/ccache /usr/bin/clang++-8  -DARROW_EXTRA_ERROR_CONTEXT -DARROW_HDFS -DARROW_JEMALLOC -DARROW_JEMALLOC_INCLUDE_DIR="" -DARROW_NO_DEPRECATED_API -DARROW_USE_SIMD -DARROW_WITH_BROTLI -DARROW_WITH_BZ2 -DARROW_WITH_LZ4 -DARROW_WITH_SNAPPY -DARROW_WITH_TIMING_TESTS -DARROW_WITH_ZLIB -DARROW_WITH_ZSTD -DURI_STATIC_BUILD -Isrc -I../src -I../src/generated -isystem ../thirdparty/flatbuffers/include -isystem /home/wesm/cpp-toolchain/include -isystem jemalloc_ep-prefix/src -isystem ../thirdparty/hadoop/include -Qunused-arguments -fcolor-diagnostics -fuse-ld=gold -ggdb -O0  -Wall -Wextra -Wdocumentation -Wno-missing-braces -Wno-unused-parameter -Wno-unknown-warning-option -Wno-constant-logical-operand -Werror -Wno-unknown-warning-option -march=skylake-avx512 -maltivec -fno-omit-frame-pointer -g -fPIE   -pthread -std=gnu++11 -MD -MT src/arrow/util/CMakeFiles/arrow-utility-test.dir/rle_encoding_test.cc.o -MF src/arrow/util/CMakeFiles/arrow-utility-test.dir/rle_encoding_test.cc.o.d -o src/arrow/util/CMakeFiles/arrow-utility-test.dir/rle_encoding_test.cc.o -c ../src/arrow/util/rle_encoding_test.cc
      In file included from ../src/arrow/util/rle_encoding_test.cc:33:
      In file included from ../src/arrow/util/bit_stream_utils.h:28:
      ../src/arrow/util/bpacking.h:49:5: error: use of undeclared identifier '__m512i_u'
        *(__m512i_u*)out = _mm512_and_epi32(_mm512_srlv_epi32(inls, shifts), masks);
          ^
      ../src/arrow/util/bpacking.h:49:15: error: expected expression
        *(__m512i_u*)out = _mm512_and_epi32(_mm512_srlv_epi32(inls, shifts), masks);
                    ^
      ../src/arrow/util/bpacking.h:55:5: error: use of undeclared identifier '__m512i_u'
        *(__m512i_u*)out = _mm512_and_epi32(_mm512_srlv_epi32(inls, shifts), masks);
          ^
      ../src/arrow/util/bpacking.h:55:15: error: expected expression
        *(__m512i_u*)out = _mm512_and_epi32(_mm512_srlv_epi32(inls, shifts), masks);
                    ^
      4 errors generated.
      

      I tried compiling with gcc 8.3 instead of clang-8 and it worked. So it seems that because the base gcc toolchain on Ubuntu 18.04 is gcc 7.x that the clang-* versions are using the gcc-7 toolchain headers. Evidently we will need to make this more robust

      Attachments

        Issue Links

          Activity

            People

              frank.du Frank Du
              wesm Wes McKinney
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h