From 44b6f8947bdfd00805fbee7e121aa9def4cabee8 Mon Sep 17 00:00:00 2001 From: yuxuan-lou <83441848+yuxuan-lou@users.noreply.github.com> Date: Fri, 13 May 2022 15:37:03 +0800 Subject: [PATCH] [NFC] polish colossalai/kernel/cuda_native/csrc/kernels/include/cuda_util.h code style (#939) --- .../kernel/cuda_native/csrc/kernels/include/cuda_util.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/colossalai/kernel/cuda_native/csrc/kernels/include/cuda_util.h b/colossalai/kernel/cuda_native/csrc/kernels/include/cuda_util.h index bc2258762..1595257be 100644 --- a/colossalai/kernel/cuda_native/csrc/kernels/include/cuda_util.h +++ b/colossalai/kernel/cuda_native/csrc/kernels/include/cuda_util.h @@ -20,7 +20,8 @@ void check_gpu_error(T result, char const *const func, const char *const file, template void print_vec(const T *outv, std::string outn, int num_output_ele); -template T *cuda_malloc(size_t ele_num); +template +T *cuda_malloc(size_t ele_num); void cuda_free(void *pdata); @@ -28,6 +29,6 @@ template void check_nan_inf(const T *data_ptr, int dsize, bool check_nan_inf, std::string file, int line, cudaStream_t stream); -#define CHECK_NAN_INF(ptr, size, stream) \ - check_nan_inf((ptr), (size), true, __FILE__, __LINE__, (stream)); \ +#define CHECK_NAN_INF(ptr, size, stream) \ + check_nan_inf((ptr), (size), true, __FILE__, __LINE__, (stream)); \ check_nan_inf((ptr), (size), false, __FILE__, __LINE__, (stream))