Skip to content

Commit a48fa64

Browse files
committed
nv_bfloat16 missed by hipify, use __nv_bfloat16 instead
1 parent 293c400 commit a48fa64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llmc/cuda_utils.cuh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ size_t sizeof_dtype(DType type) {
9696
case DType::FP16:
9797
return sizeof(half);
9898
case DType::BF16:
99-
return sizeof(nv_bfloat16);
99+
return sizeof(__nv_bfloat16);
100100
default: // handle or get compiler warning
101101
fprintf(stderr, "Unknown datatype\n");
102102
exit(EXIT_FAILURE);
103103
}
104104
}
105105

106106
DType dtype_of(float* f) { return DType::FP32; }
107-
DType dtype_of(nv_bfloat16 * f) { return DType::BF16; }
107+
DType dtype_of(__nv_bfloat16 * f) { return DType::BF16; }
108108
DType dtype_of(half * f) { return DType::FP16; }
109109

110110

0 commit comments

Comments
 (0)