Open
Description
Using std::clamp
fails to compile with clang 18.1.7 and gcc 14.1 libstd. It works with gcc 13.2.
Error message is
external/local_config_clang/crosstool/extra_tools/lib/gcc/x86_64-linux-gnu/14.1.0/../../../../include/c++/14.1.0/bits/stl_algo.h:3625:7: error: reference to __host__ function '__glibcxx_assert_fail' in __host__ __device__ function
3625 | __glibcxx_assert(!(__hi < __lo));
| ^
external/local_config_clang/crosstool/extra_tools/lib/gcc/x86_64-linux-gnu/14.1.0/../../../../include/x86_64-linux-gnu/c++/14.1.0/bits/c++config.h:612:7: note: expanded from macro '__glibcxx_assert'
612 | std::__glibcxx_assert_fail(); \
| ^
quantize.cu.cc:12:13: note: called by 'quantize_z'
12 | std::clamp(z, kMinZ, kMaxZ);
| ^