Unverified Commit efd4b62a authored by Kunlun Li's avatar Kunlun Li Committed by GitHub
Browse files

Fix bug when compiling in CUDA12.1 (#560)



Avoid redeclaration error of "nv_bfloat16" when Compiling in CUDA12.1.
Error log: /usr/local/cuda/include/cuda_fp16.hpp(2724): error: invalid redeclaration of type name "nv_bfloat16" (declared at line 2837 of /usr/local/cuda/include/cuda_bf16.hpp)
Signed-off-by: default avatarKunlun Li <94586211+kunlunl@users.noreply.github.com>
parent 37b3b7a7
......@@ -4,18 +4,21 @@
* See LICENSE for license information.
************************************************************************/
#include <stdio.h>
#include <assert.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp8.h>
#if __CUDA_ARCH__ >= 800
#include <cuda_bf16.h>
#define half nv_bfloat16
#else
#include <cuda_fp16.h>
#endif
#include "userbuffers.h"
#include <assert.h>
#include <cuda_fp8.h>
#include <stdio.h>
#define MAX_THREADS 1024
#define TIMEOUT 200000000000ull
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment