From fbd116c0e5702418d01bf275c9002f136f1b2523 Mon Sep 17 00:00:00 2001 From: eqy Date: Wed, 31 Jul 2024 06:54:57 -0700 Subject: [PATCH] fix build on SM 5.2 (#1664) --- include/cutlass/functional.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cutlass/functional.h b/include/cutlass/functional.h index f1444b31..da946c7c 100644 --- a/include/cutlass/functional.h +++ b/include/cutlass/functional.h @@ -234,7 +234,7 @@ template <> struct inverse_square_root { 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(result); #else