Skip to content

Commit d1faeca

Browse files
committed
cuda : fix supports_op for norm
1 parent b135927 commit d1faeca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ggml/src/ggml-cuda.cu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3107,18 +3107,20 @@ static bool ggml_backend_cuda_device_supports_op(ggml_backend_dev_t dev, const g
31073107
}
31083108
return false;
31093109
} break;
3110+
case GGML_OP_NORM:
3111+
case GGML_OP_RMS_NORM:
3112+
return ggml_is_contiguous(op->src[0]) && op->ne[0] % WARP_SIZE == 0;
3113+
break;
31103114
case GGML_OP_NONE:
31113115
case GGML_OP_RESHAPE:
31123116
case GGML_OP_VIEW:
31133117
case GGML_OP_PERMUTE:
31143118
case GGML_OP_TRANSPOSE:
3115-
case GGML_OP_NORM:
31163119
case GGML_OP_ADD:
31173120
case GGML_OP_ADD1:
31183121
case GGML_OP_SUB:
31193122
case GGML_OP_MUL:
31203123
case GGML_OP_DIV:
3121-
case GGML_OP_RMS_NORM:
31223124
case GGML_OP_SCALE:
31233125
case GGML_OP_SQR:
31243126
case GGML_OP_SQRT:

0 commit comments

Comments
 (0)