Parcourir la source

Fix FAv3 compilation with MSVC (#1240)

hlky il y a 6 mois
Parent
commit
8476986721
1 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 7 0
      hopper/setup.py

+ 7 - 0
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",