Skip to content

Commit a0c67c7

Browse files
committed
cont: avoid using make_nvbfloat16
1 parent 6c7139f commit a0c67c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ggml/src/ggml-cuda/mmvf.cu

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ static __global__ void mul_mat_vec_f(
147147
const nv_bfloat162 * gate_x2 = has_gate ? (const nv_bfloat162 *) gate_x : nullptr;
148148
for (int col2 = tid; col2 < ncols2; col2 += block_size) {
149149
const nv_bfloat162 tmpx = x2[col2];
150-
const nv_bfloat162 tmpx_gate = has_gate ? gate_x2[col2] : make_bfloat162(0.0f, 0.0f);
150+
nv_bfloat162 tmpx_gate;
151+
if constexpr (has_gate) {
152+
tmpx_gate = gate_x2[col2];
153+
}
151154
#pragma unroll
152155
for (int j = 0; j < ncols_dst; ++j) {
153156
const float2 tmpy = y2[j*stride_col_y2 + col2];

0 commit comments

Comments
 (0)