You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to build NumPy using the Clang-19 thread sanitizer, I get the following compiler error:
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:15:5: error: no function template matches function template specialization 'QSort_ASIMD'
15 | DISPATCH_VQSORT(int32_t)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:23:1: note: expanded from here
23 | QSort_ASIMD
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:16:5: error: no function template matches function template specialization 'QSort_ASIMD'
16 | DISPATCH_VQSORT(uint32_t)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:25:1: note: expanded from here
25 | QSort_ASIMD
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:17:5: error: no function template matches function template specialization 'QSort_ASIMD'
17 | DISPATCH_VQSORT(int64_t)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:27:1: note: expanded from here
27 | QSort_ASIMD
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:18:5: error: no function template matches function template specialization 'QSort_ASIMD'
18 | DISPATCH_VQSORT(uint64_t)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:29:1: note: expanded from here
29 | QSort_ASIMD
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:19:5: error: no function template matches function template specialization 'QSort_ASIMD'
19 | DISPATCH_VQSORT(double)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:31:1: note: expanded from here
31 | QSort_ASIMD
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:20:5: error: no function template matches function template specialization 'QSort_ASIMD'
20 | DISPATCH_VQSORT(float)
| ^
../numpy/_core/src/npysort/highway_qsort.dispatch.cpp:8:17: note: expanded from macro 'DISPATCH_VQSORT'
8 | template<> void NPY_CPU_DISPATCH_CURFX(QSort)(TYPE *arr, intptr_t size) \
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:155:42: note: expanded from macro 'NPY_CPU_DISPATCH_CURFX'
155 | #define NPY_CPU_DISPATCH_CURFX(NAME) NPY__CPU_CAT(NPY__CPU_CAT(NAME, _), NPY_MTARGETS_CURRENT)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:42:28: note: expanded from macro 'NPY__CPU_CAT'
42 | #define NPY__CPU_CAT(a, b) NPY__CPU_CAT_(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:41:29: note: expanded from macro 'NPY__CPU_CAT_'
41 | #define NPY__CPU_CAT_(a, b) NPY__CPU_CAT__(a, b)
| ^
/Users/goldbaum/Documents/numpy/build/meson_cpu/npy_cpu_dispatch_config.h:40:30: note: expanded from macro 'NPY__CPU_CAT__'
40 | #define NPY__CPU_CAT__(a, b) a ## b
| ^
<scratch space>:33:1: note: expanded from here
33 | QSort_ASIMD
| ^
6 errors generated.
This seems similar to other issues we've seen where highway didn't play nicely with address sanitizer. If I manually disable highway by defining NPY_DISABLE_HIGHWAY_SORT at compile time I get different errors about missing function template specializations.
ping @Mousius, not sure why I'm getting past the HWY_IS_TSAN check. I'm building numpy on my Mac with clang-19 installed via homebrew:
@ngoldbaum looks like we've gotten out of sync with Highway's shared-inl.h again. I've raised google/highway#2421 to split the constant so we can check VQSORT_COMPILER_COMPATIBLE instead.
Can you try using the value of that macro in place of NPY_DISABLE_HIGHWAY_SORT for now?
Uh oh!
There was an error while loading. Please reload this page.
When I try to build NumPy using the Clang-19 thread sanitizer, I get the following compiler error:
This seems similar to other issues we've seen where highway didn't play nicely with address sanitizer. If I manually disable highway by defining
NPY_DISABLE_HIGHWAY_SORT
at compile time I get different errors about missing function template specializations.ping @Mousius, not sure why I'm getting past the
HWY_IS_TSAN
check. I'm building numpy on my Mac with clang-19 installed via homebrew:The text was updated successfully, but these errors were encountered: