Skip to content

Commit d0b9ce8

Browse files
oelayan7amaurya
authored andcommitted
wrap include cuda_bf16.h with ifdef BF16_AVAILABLE (deepspeedai#6520)
1 parent 71fb098 commit d0b9ce8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

csrc/fp_quantizer/fp_quantize.cu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
#include <cuda_fp16.h>
1616
#include <curand_kernel.h>
1717

18+
#ifdef BF16_AVAILABLE
1819
#include <cuda_bf16.h>
20+
#endif
1921
#include <cuda_runtime_api.h>
2022

2123
using ROp = reduce::ROpType;

csrc/fp_quantizer/includes/fp_quantize.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010

1111
#include <cuda_fp16.h>
1212

13+
#ifdef BF16_AVAILABLE
1314
#include <cuda_bf16.h>
15+
#endif
1416
#include <cuda_runtime_api.h>
1517
#include <stdio.h>
1618

0 commit comments

Comments
 (0)