Skip to content

Disable sve vectorization at configure time, and don't set -march=native #9

@haampie

Description

@haampie
  1. This branch is hit at compile time:
    #error "This is for SVE512"
    which is rather annoying. Can you test whether 512 vector width is supported in CMake, and disable it if unsupported? Otherwise the build simply fails.
  2. Can you please make this here

    bricklib/CMakeLists.txt

    Lines 105 to 118 in d817250

    set(BRICK_BUILD_ARCH "native" CACHE STRING "Specify build architecture target")
    check_cxx_compiler_flag("-march=${BRICK_BUILD_ARCH}" HAS_MARCH)
    if (HAS_MARCH)
    message(STATUS "Using march=${BRICK_BUILD_ARCH}")
    add_compile_options(-march=${BRICK_BUILD_ARCH})
    else ()
    # Work around Summit only have mcpu flag
    check_cxx_compiler_flag("-mcpu=${BRICK_BUILD_ARCH}" HAS_MCPU)
    if (HAS_MCPU)
    message(STATUS "Using mcpu=${BRICK_BUILD_ARCH}")
    add_compile_options(-mcpu=${BRICK_BUILD_ARCH})
    endif ()
    endif ()
    opt in? Compiler wrappers may set the relevant -march flag, so in your CMake logic you can just test what vectorization features are supported without any additional flags and work with that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions