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

[C++] SIMD info always returning none on MacOS

    XMLWordPrintableJSON

Details

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

    Description

      I'm helping with ARROW-11507 and in testing it I noticed something odd, I'm getting none and none for both simd_level and detected_simd_level which seems odd. I also tried it in pyarrow (below) and I'm getting the same thing (this was built off of HEAD of apache/arrow) so I suspect that this is something lower than either of them (and in both runtime_info is a think wrapper around the c++).

      >>> import pyarrow as pa
      >>> pa.runtime_info()
      RuntimeInfo(simd_level='none', detected_simd_level='none')
      

      I do see the following when building:

      --   ARROW_SIMD_LEVEL=SSE4_2 [default=NONE|SSE4_2|AVX2|AVX512]
      --       Compile-time SIMD optimization level
      --   ARROW_RUNTIME_SIMD_LEVEL=MAX [default=NONE|SSE4_2|AVX2|AVX512|MAX]
      --       Max runtime SIMD optimization level
      and sse/avx etc are built:
      
      -- Performing Test CXX_SUPPORTS_SSE4_2
      -- Performing Test CXX_SUPPORTS_SSE4_2 - Success
      -- Performing Test CXX_SUPPORTS_AVX2
      -- Performing Test CXX_SUPPORTS_AVX2 - Success
      -- Performing Test CXX_SUPPORTS_AVX512
      -- Performing Test CXX_SUPPORTS_AVX512 - Success
      

      I've also tried confirming that ARROW_USER_SIMD_LEVEL is unset, and tried setting it explicitly:

      (pyarrow-source) jkeane@het python % ARROW_USER_SIMD_LEVEL=sse4_2 python
      Python 3.9.2 (default, Feb 24 2021, 13:26:09)
      [Clang 12.0.0 (clang-1200.0.32.29)] on darwin
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import pyarrow as pa
      >>> pa.runtime_info()
      RuntimeInfo(simd_level='none', detected_simd_level='none')
      

      I've tested it on two macOS machines (both running on intel chips) and both had the same behavior above. This appears to work on linux machines just fine.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              jonkeane Jonathan Keane
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 3h 50m
                  3h 50m