Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
haampie opened this issue Oct 4, 2023 · 0 comments

Comments

@haampie
Copy link

haampie commented Oct 4, 2023

  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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant