Skip to content

Commit 0a77331

Browse files
committed
Ext: Fix CUDA type cast
The __half_as_ushort function isn't present in cuda < 12.4 Signed-off-by: kingbri <[email protected]>
1 parent 9d62150 commit 0a77331

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exllamav2/exllamav2_ext/cuda/q_mlp.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ void QMoEMLP::forward_
416416

417417
for (int i = 0; i < num_experts; i++)
418418
{
419-
uint16_t w = __half_as_ushort(h_logits[i]);
419+
uint16_t w = *reinterpret_cast<const uint16_t*>(&h_logits[i]);
420420
if (!w) continue;
421421

422422
gemm_half_q_half_cuda(stream, cublas_handle, temp_state, w1[i], temp_a, rows, intermediate_size, columns, true, temp_dq, true, temp_logits + i, num_experts, false);

0 commit comments

Comments
 (0)