From 2211db5fabbd4e91dd1cb89605ba23762491b949 Mon Sep 17 00:00:00 2001 From: Eric Engelhart Date: Tue, 4 Oct 2022 21:25:46 -0400 Subject: [PATCH] Fixed switch statement, thanks @yocabon --- csrc/flash_attn/src/fp16_switch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/csrc/flash_attn/src/fp16_switch.h b/csrc/flash_attn/src/fp16_switch.h index c224d4d..fed7cb9 100644 --- a/csrc/flash_attn/src/fp16_switch.h +++ b/csrc/flash_attn/src/fp16_switch.h @@ -18,10 +18,10 @@ #define FP16_SWITCH(COND, ...) \ [&] { \ if (COND) { \ - using elem_type = std::conditional::type; \ + using elem_type = __nv_bfloat16; \ return __VA_ARGS__(); \ } else { \ - using elem_type = std::conditional::type; \ + using elem_type = __half; \ return __VA_ARGS__(); \ } \ }() \ No newline at end of file