Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85281

AVX (and friends) on macOS Rosetta

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • None
    • 5.15, 6.0.0
    • Core: Other
    • None
    • macOS

    Description

      Rosetta translates all x86_64 instructions, but it doesn’t support the execution of some newer instruction sets and processor features, such as AVX, AVX2, and AVX512 vector instructions. If you include these newer instructions in your code, execute them only after verifying that they are available. For example, to determine if AVX512 vector instructions are available, use the sysctlbyname function to check the hw.optional.avx512f attribute.

      https://developer.apple.com/documentation/apple_silicon/about_the_rosetta_translation_environment?language=objc

      The qDetectCpuFeatures() logic in qsimd.cpp may need to adjust to this, if the existing xgetbv-based logic does not pick it up.

      Attachments

        Issue Links

          Activity

            People

              thiago Thiago Macieira
              vestbo Tor Arne Vestbø
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: