Problem
The v0.0.2 source does not compile for i586/32-bit x86 with GCC and -Werror=narrowing. The failure is in src/vt/cuda/nvfp4_plan_cache.h:
constexpr size_t kGolden = sizeof(size_t) == 8 ? size_t{0x9e3779b97f4a7c15ULL}
: size_t{0x9e3779b9UL};
GCC reports:
error: narrowing conversion of ‘11400714819323198485’ from ‘long long unsigned int’ to ‘size_t’ {aka ‘unsigned int’} [-Wnarrowing]
The conditional expression is valid conceptually, but the 64-bit braced initializer is still diagnosed as narrowing when size_t is 32-bit.
Reproducer
Build v0.0.2 on i586 with the normal openSUSE optimization flags and C++20 enabled.
Proposed direction
Use explicit casts or architecture-conditional definitions so both constants are well-formed for 32-bit and 64-bit size_t, for example:
constexpr size_t kGolden = sizeof(size_t) == 8
? static_cast<size_t>(0x9e3779b97f4a7c15ULL)
: static_cast<size_t>(0x9e3779b9UL);
The openSUSE package currently carries this as a downstream patch.
Problem
The v0.0.2 source does not compile for i586/32-bit x86 with GCC and
-Werror=narrowing. The failure is insrc/vt/cuda/nvfp4_plan_cache.h:GCC reports:
The conditional expression is valid conceptually, but the 64-bit braced initializer is still diagnosed as narrowing when
size_tis 32-bit.Reproducer
Build v0.0.2 on i586 with the normal openSUSE optimization flags and C++20 enabled.
Proposed direction
Use explicit casts or architecture-conditional definitions so both constants are well-formed for 32-bit and 64-bit
size_t, for example:The openSUSE package currently carries this as a downstream patch.