diff --git a/csrc/src/static_switch.h b/csrc/src/static_switch.h index d912812..00322bd 100644 --- a/csrc/src/static_switch.h +++ b/csrc/src/static_switch.h @@ -46,6 +46,16 @@ #define EVENK_SWITCH BOOL_SWITCH #endif +#ifdef FLASHATTENTION_DISABLE_SOFTCAP + #define SOFTCAP_SWITCH(COND, CONST_NAME, ...) \ + [&] { \ + constexpr static bool CONST_NAME = false; \ + return __VA_ARGS__(); \ + }() +#else + #define SOFTCAP_SWITCH BOOL_SWITCH +#endif + #define FP16_SWITCH(COND, ...) \ [&] { \ if (COND) { \