Skip to content

Commit c247eea

Browse files
authored
Fixes a misformated macros (#204)
Signed-off-by: Tao He <[email protected]>
1 parent 9206727 commit c247eea

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

python/csrc/pytorch_extension_utils.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -51,20 +51,20 @@ using namespace flashinfer;
5151
} \
5252
}()
5353
#else
54-
#define DISPATCH_PYTORCH_DTYPE_TO_CTYPE(pytorch_dtype, c_type, ...) [&]() -> bool { \
55-
switch (pytorch_dtype) { \
56-
case at::ScalarType::Half: { \
57-
using c_type = nv_half; \
58-
return __VA_ARGS__(); \
59-
} \
60-
default: \
61-
std::ostringstream oss; \
54+
#define DISPATCH_PYTORCH_DTYPE_TO_CTYPE(pytorch_dtype, c_type, ...) \
55+
[&]() -> bool { \
56+
switch (pytorch_dtype) { \
57+
case at::ScalarType::Half: { \
58+
using c_type = nv_half; \
59+
return __VA_ARGS__(); \
60+
} \
61+
default: \
62+
std::ostringstream oss; \
6263
oss << __PRETTY_FUNCTION__ << " failed to dispatch data type " << pytorch_dtype; \
63-
TORCH_CHECK(false, oss.str()); \
64-
return false; \
65-
}
66-
}
67-
()
64+
TORCH_CHECK(false, oss.str()); \
65+
return false; \
66+
} \
67+
} ()
6868
#endif
6969

7070
#ifdef FLASHINFER_ENABLE_FP8

0 commit comments

Comments
 (0)