|
| 1 | +############################################################################### |
| 2 | +# Copyright (c) 2025, The OpenBLAS Project |
| 3 | +# All rights reserved. |
| 4 | +# Redistribution and use in source and binary forms, with or without |
| 5 | +# modification, are permitted provided that the following conditions are |
| 6 | +# met: |
| 7 | +# 1. Redistributions of source code must retain the above copyright |
| 8 | +# notice, this list of conditions and the following disclaimer. |
| 9 | +# 2. Redistributions in binary form must reproduce the above copyright |
| 10 | +# notice, this list of conditions and the following disclaimer in |
| 11 | +# the documentation and/or other materials provided with the |
| 12 | +# distribution. |
| 13 | +# 3. Neither the name of the OpenBLAS project nor the names of |
| 14 | +# its contributors may be used to endorse or promote products |
| 15 | +# derived from this software without specific prior written permission. |
| 16 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 17 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 | +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
| 19 | +# ARE DISCLAIMED. IN NO EVENT SHALL THE OPENBLAS PROJECT OR CONTRIBUTORS BE |
| 20 | +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 21 | +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 22 | +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 23 | +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 24 | +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 25 | +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 26 | +# POSSIBILITY OF SUCH DAMAGE. |
| 27 | +############################################################################### |
1 | 28 | ##
|
2 | 29 | ## Author: Hank Anderson <[email protected]>
|
3 | 30 | ## Description: Ported from portion of OpenBLAS/Makefile.system
|
@@ -192,17 +219,35 @@ if (${CORE} STREQUAL A64FX)
|
192 | 219 | endif ()
|
193 | 220 | endif ()
|
194 | 221 |
|
| 222 | +if (${CORE} STREQUAL NEOVERSEV2) |
| 223 | + if (NOT DYNAMIC_ARCH) |
| 224 | + if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE) |
| 225 | + set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-v2") |
| 226 | + elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE) |
| 227 | + set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2") |
| 228 | + else () |
| 229 | + if (${GCC_VERSION} VERSION_GREATER 13.0 OR ${GCC_VERSION} VERSION_EQUAL 13.0) |
| 230 | + set (CCOMMON_OPT "${CCOMMON_OPT} -mcpu=neoverse-v2") |
| 231 | + elseif (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4) |
| 232 | + set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.4-a+sve+bf16 -mtune=neoverse-v1") |
| 233 | + else () |
| 234 | + set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16") |
| 235 | + endif() |
| 236 | + endif () |
| 237 | + endif () |
| 238 | +endif () |
| 239 | + |
195 | 240 | if (${CORE} STREQUAL NEOVERSEN2)
|
196 | 241 | if (NOT DYNAMIC_ARCH)
|
197 | 242 | if (${CMAKE_C_COMPILER_ID} STREQUAL "PGI" AND NOT NO_SVE)
|
198 | 243 | set (CCOMMON_OPT "${CCOMMON_OPT} -Msve_intrinsics -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
199 | 244 | elseif (${CMAKE_C_COMPILER_ID} STREQUAL "NVC" AND NOT NO_SVE)
|
200 | 245 | set (CCOMMON_OPT "${CCOMMON_OPT} -tp=neoverse-v2")
|
201 | 246 | else ()
|
202 |
| - if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4) |
| 247 | + if (${GCC_VERSION} VERSION_GREATER 11.1 OR ${GCC_VERSION} VERSION_EQUAL 11.1) |
203 | 248 | set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2")
|
204 | 249 | else ()
|
205 |
| - set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve") |
| 250 | + set (CCOMMON_OPT "${CCOMMON_OPT} -march=armv8.2-a+sve+bf16") |
206 | 251 | endif()
|
207 | 252 | endif ()
|
208 | 253 | endif ()
|
|
0 commit comments