这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions hwy/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,8 +410,9 @@ HWY_DLLEXPORT HWY_NORETURN void HWY_FORMAT(3, 4)
#if !defined(HWY_IS_DEBUG_BUILD)
// Clang does not define NDEBUG, but it and GCC define __OPTIMIZE__, and recent
// MSVC defines NDEBUG (if not, could instead check _DEBUG).
#if (!defined(__OPTIMIZE__) && !defined(NDEBUG)) || \
(HWY_IS_SANITIZER && !HWY_IS_UBSAN) || defined(__clang_analyzer__)
#if (!defined(__OPTIMIZE__) && !defined(NDEBUG)) || \
(HWY_IS_ASAN || (HWY_IS_SANITIZER && !HWY_IS_UBSAN)) || \
defined(__clang_analyzer__)
#define HWY_IS_DEBUG_BUILD 1
#else
#define HWY_IS_DEBUG_BUILD 0
Expand Down Expand Up @@ -1746,7 +1747,11 @@ HWY_F16_CONSTEXPR inline std::partial_ordering operator<=>(
#ifndef HWY_HAVE_SCALAR_BF16_OPERATORS
// Recent enough compiler also has operators. aarch64 clang 18 hits internal
// compiler errors on bf16 ToString, hence only enable on GCC for now.
#if HWY_HAVE_SCALAR_BF16_TYPE && (HWY_COMPILER_GCC_ACTUAL >= 1300)
// GCC >= 13 will insert a function call to the __extendbfsf2 helper function
// for scalar conversions from __bf16 to float. This is prohibitively expensive,
// so refrain from using scalar BF16 operators on these compiler versions.
// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121853
#if HWY_HAVE_SCALAR_BF16_TYPE && (HWY_COMPILER_GCC_ACTUAL >= 1700)
#define HWY_HAVE_SCALAR_BF16_OPERATORS 1
#else
#define HWY_HAVE_SCALAR_BF16_OPERATORS 0
Expand Down
Loading