92b1c4e0d24955e11b933183f00abc4afdbdd680 / dev-util/radiance/files/radiance-2.1.0-clang-24-host-device-constexpr.patch · 739 bytes · raw
diff -ruN a/libr4d/r4d_fp8_wmma.h b/libr4d/r4d_fp8_wmma.h
--- a/libr4d/r4d_fp8_wmma.h
+++ b/libr4d/r4d_fp8_wmma.h
@@ -163,7 +163,9 @@
// block instead of 32, allowing 3 resident blocks per WGP instead of 4, which the saved bank
// cycle outweighs.
template <uint32_t FK>
-__device__ __forceinline__ constexpr uint32_t lds_pitch() { return FK + 8u; }
+// clang 24 evaluates Lds<NT>::kB (r4d_logits_vocab.hip) in the host pass, where a
+// __device__-only constexpr is not callable; the pure pitch helper is host-visible too.
+__host__ __device__ __forceinline__ constexpr uint32_t lds_pitch() { return FK + 8u; }
template <uint32_t FK>
__device__ __forceinline__ i2v frag(const uint8_t* __restrict__ lds, uint32_t row0, uint32_t k0,