google / highway

Performance-portable, length-agnostic SIMD with runtime dispatch
Apache License 2.0
3.95k stars 305 forks source link

Fails to build on riscv without RVV 1.0 despite #2159 #2227

Closed eclipseo closed 1 month ago

eclipseo commented 1 month ago

Hello,

The latest Highway 1.2.0, on Fedora Rawhide, riscv arch, Clang 18.1.6:

In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:19:
/usr/bin/../lib/clang/18/include/riscv_vector.h:18:2: error: "Vector intrinsics require the vector extension."
   18 | #error "Vector intrinsics require the vector extension."
      |  ^
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: use of undeclared identifier '__riscv_vsetvlmax_e8mf8'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      |                 ^
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: use of undeclared identifier '__riscv_vsetvl_e8mf8'
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: use of undeclared identifier '__riscv_vsetvl_e8mf8'
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: use of undeclared identifier '__riscv_vsetvl_e8mf8'
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: use of undeclared identifier '__riscv_vsetvl_e8mf8'
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:496:25: note: expanded from macro 'HWY_RVV_LANES'
  496 |     return N == kFull ? __riscv_vsetvlmax_e##SEW##LMUL()                       \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:2:1: note: expanded from here
    2 | __riscv_vsetvlmax_e8mf4
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:67:35: note: expanded from macro '__riscv_vsetvlmax_e8mf4'
   67 | #define __riscv_vsetvlmax_e8mf4() __builtin_rvv_vsetvlimax(0, 6)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:497:25: note: expanded from macro 'HWY_RVV_LANES'
  497 |                       : __riscv_vsetvl_e##SEW##LMUL(kCap);                     \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:4:1: note: expanded from here
    4 | __riscv_vsetvl_e8mf4
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:38:35: note: expanded from macro '__riscv_vsetvl_e8mf4'
   38 | #define __riscv_vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:482:18: note: expanded from macro 'HWY_RVV_CAPPED_LANES_SPECIAL_CASES'
  482 |                ? __riscv_vsetvl_e##SEW##LMUL(cap)                              \
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:9:1: note: expanded from here
    9 | __riscv_vsetvl_e8mf4
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:38:35: note: expanded from macro '__riscv_vsetvl_e8mf4'
   38 | #define __riscv_vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:483:18: note: expanded from macro 'HWY_RVV_CAPPED_LANES_SPECIAL_CASES'
  483 |                : __riscv_vsetvl_e##SEW##LMUL(HWY_MIN(cap, kMaxLanes));         \
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:11:1: note: expanded from here
   11 | __riscv_vsetvl_e8mf4
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:38:35: note: expanded from macro '__riscv_vsetvl_e8mf4'
   38 | #define __riscv_vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:559:14: note: expanded from macro 'HWY_RVV_LANES'
  559 |       return __riscv_vsetvl_e##SEW##LMUL(HWY_MIN(cap, kMaxLanes));             \
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:13:1: note: expanded from here
   13 | __riscv_vsetvl_e8mf4
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:38:35: note: expanded from macro '__riscv_vsetvl_e8mf4'
   38 | #define __riscv_vsetvl_e8mf4(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 6)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:496:25: note: expanded from macro 'HWY_RVV_LANES'
  496 |     return N == kFull ? __riscv_vsetvlmax_e##SEW##LMUL()                       \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:19:1: note: expanded from here
   19 | __riscv_vsetvlmax_e8mf2
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:68:35: note: expanded from macro '__riscv_vsetvlmax_e8mf2'
   68 | #define __riscv_vsetvlmax_e8mf2() __builtin_rvv_vsetvlimax(0, 7)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:497:25: note: expanded from macro 'HWY_RVV_LANES'
  497 |                       : __riscv_vsetvl_e##SEW##LMUL(kCap);                     \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:21:1: note: expanded from here
   21 | __riscv_vsetvl_e8mf2
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:39:35: note: expanded from macro '__riscv_vsetvl_e8mf2'
   39 | #define __riscv_vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:482:18: note: expanded from macro 'HWY_RVV_CAPPED_LANES_SPECIAL_CASES'
  482 |                ? __riscv_vsetvl_e##SEW##LMUL(cap)                              \
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:26:1: note: expanded from here
   26 | __riscv_vsetvl_e8mf2
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:39:35: note: expanded from macro '__riscv_vsetvl_e8mf2'
   39 | #define __riscv_vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:483:18: note: expanded from macro 'HWY_RVV_CAPPED_LANES_SPECIAL_CASES'
  483 |                : __riscv_vsetvl_e##SEW##LMUL(HWY_MIN(cap, kMaxLanes));         \
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:28:1: note: expanded from here
   28 | __riscv_vsetvl_e8mf2
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:39:35: note: expanded from macro '__riscv_vsetvl_e8mf2'
   39 | #define __riscv_vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:559:14: note: expanded from macro 'HWY_RVV_LANES'
  559 |       return __riscv_vsetvl_e##SEW##LMUL(HWY_MIN(cap, kMaxLanes));             \
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:30:1: note: expanded from here
   30 | __riscv_vsetvl_e8mf2
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:39:35: note: expanded from macro '__riscv_vsetvl_e8mf2'
   39 | #define __riscv_vsetvl_e8mf2(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 7)
      |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:496:25: note: expanded from macro 'HWY_RVV_LANES'
  496 |     return N == kFull ? __riscv_vsetvlmax_e##SEW##LMUL()                       \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:36:1: note: expanded from here
   36 | __riscv_vsetvlmax_e8m1
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:69:34: note: expanded from macro '__riscv_vsetvlmax_e8m1'
   69 | #define __riscv_vsetvlmax_e8m1() __builtin_rvv_vsetvlimax(0, 0)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:497:25: note: expanded from macro 'HWY_RVV_LANES'
  497 |                       : __riscv_vsetvl_e##SEW##LMUL(kCap);                     \
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:38:1: note: expanded from here
   38 | __riscv_vsetvl_e8m1
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:40:34: note: expanded from macro '__riscv_vsetvl_e8m1'
   40 | #define __riscv_vsetvl_e8m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 0)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:27:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/foreach_target.h:314:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/per_target.cc:28:
In file included from /builddir/build/BUILD/highway-1.2.0/hwy/highway.h:596:
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:591:17: error: builtin requires at least one of the following extensions: 'Zve32x'
  591 | HWY_RVV_FOREACH(HWY_RVV_LANES, Lanes, setvlmax_e, _ALL)
      | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:411:22: note: expanded from macro 'HWY_RVV_FOREACH'
  411 |   HWY_RVV_FOREACH_UI(X_MACRO, NAME, OP, LMULS)    \
      |   ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:407:21: note: expanded from macro 'HWY_RVV_FOREACH_UI'
  407 |   HWY_RVV_FOREACH_U(X_MACRO, NAME, OP, LMULS)        \
      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:394:23: note: expanded from macro 'HWY_RVV_FOREACH_U'
  394 |   HWY_RVV_FOREACH_U08(X_MACRO, NAME, OP, LMULS)     \
      |   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
/builddir/build/BUILD/highway-1.2.0/hwy/ops/rvv-inl.h:482:18: note: expanded from macro 'HWY_RVV_CAPPED_LANES_SPECIAL_CASES'
  482 |                ? __riscv_vsetvl_e##SEW##LMUL(cap)                              \
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<scratch space>:43:1: note: expanded from here
   43 | __riscv_vsetvl_e8m1
      | ^
/usr/bin/../lib/clang/18/include/riscv_vector.h:40:34: note: expanded from macro '__riscv_vsetvl_e8m1'
   40 | #define __riscv_vsetvl_e8m1(avl) __builtin_rvv_vsetvli((size_t)(avl), 0, 0)
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]

Apparently this https://github.com/google/highway/commit/ba6a13d4adeec2dbaf1ba829d11dc9cc98b73030 / https://github.com/google/highway/pull/2159 was supposed to fix the issue of RISCV without RVV, but it doesn't seem to be working.

jan-wassenberg commented 1 month ago

Hi @eclipseo , thanks for reporting. It appears our internal RISC-V header lacks this error/requirement, that's surprising. I've pinged the LLVM issue. In the meantime, let's default runtime dispatch to disabled on RISC-V and allow override.