1234567891011121314151617181920212223242526272829303132333435363738394041 |
- diff --git a/hwy/aligned_allocator.cc b/hwy/aligned_allocator.cc
- index bec7c3b..677fcf1 100644
- --- a/hwy/aligned_allocator.cc
- +++ b/hwy/aligned_allocator.cc
- @@ -27,7 +27,14 @@
- namespace hwy {
- namespace {
-
- +#if HWY_ARCH_RVV && defined(__riscv_vector)
- +// Not actually an upper bound on the size, but this value prevents crossing a
- +// 4K boundary (relevant on Andes).
- +constexpr size_t kAlignment = HWY_MAX(HWY_ALIGNMENT, 4096);
- +#else
- constexpr size_t kAlignment = HWY_MAX(HWY_ALIGNMENT, kMaxVectorSize);
- +#endif
- +
- // On x86, aliasing can only occur at multiples of 2K, but that's too wasteful
- // if this is used for single-vector allocations. 256 is more reasonable.
- constexpr size_t kAlias = kAlignment * 4;
- diff --git a/hwy/base.h b/hwy/base.h
- index d87eb34..db5df58 100644
- --- a/hwy/base.h
- +++ b/hwy/base.h
- @@ -319,7 +319,7 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 64; // AVX-512
- #elif HWY_ARCH_RVV
- // Not actually an upper bound on the size, but this value prevents crossing a
- // 4K boundary (relevant on Andes).
- -static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 4096;
- +static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 64;
- #define HWY_ALIGN_MAX alignas(8) // only elements need be aligned
- #else
- static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16;
- @@ -333,7 +333,7 @@ static constexpr HWY_MAYBE_UNUSED size_t kMaxVectorSize = 16;
- // by concatenating base type and bits.
-
- // RVV already has a builtin type and the GCC intrinsics require it.
- -#if HWY_ARCH_RVV && HWY_COMPILER_GCC
- +#if HWY_ARCH_RVV && HWY_COMPILER_GCC && 0
- #define HWY_NATIVE_FLOAT16 1
- #else
- #define HWY_NATIVE_FLOAT16 0
|