From 8476986721ca38a0f56766d925fad12ae0ae9358 Mon Sep 17 00:00:00 2001 From: hlky Date: Fri, 20 Sep 2024 20:44:59 +0100 Subject: [PATCH] Fix FAv3 compilation with MSVC (#1240) --- hopper/setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hopper/setup.py b/hopper/setup.py index 2a23d16..029455a 100644 --- a/hopper/setup.py +++ b/hopper/setup.py @@ -146,6 +146,13 @@ if not SKIP_CUDA_BUILD: "-DCUTLASS_DEBUG_TRACE_LEVEL=0", # Can toggle for debugging "-DNDEBUG", # Important, otherwise performance is severely impacted ] + if get_platform() == "win_amd64": + nvcc_flags.extend( + [ + "-D_USE_MATH_DEFINES", # for M_LN2 + "-Xcompiler=/Zc:__cplusplus", # sets __cplusplus correctly, CUTLASS_CONSTEXPR_IF_CXX17 needed for cutlass::gcd + ] + ) include_dirs = [ # Path(this_dir) / "fmha-pipeline", # repo_dir / "lib",