fix build on SM 5.2 (#1664)

This commit is contained in:
eqy 2024-07-31 06:54:57 -07:00 committed by GitHub
parent 5b283c872c
commit fbd116c0e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -234,7 +234,7 @@ template <>
struct inverse_square_root<half_t> {
CUTLASS_HOST_DEVICE
half_t operator()(half_t const &lhs) const {
#if defined(__CUDA_ARCH__)
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ > 520
auto result = hrsqrt(reinterpret_cast<__half const &>(lhs));
return reinterpret_cast<half_t const &>(result);
#else