Skip to content

Commit 6975343

Browse files
committed
ggml-cpu : address review comments
- rename GGML_RMS_NORM_FUSE_XXX to GGML_RMS_NORM_FUSE_OP_xxx
1 parent 1602e65 commit 6975343

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ggml/src/ggml-cpu/ops.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3716,8 +3716,8 @@ void ggml_compute_forward_norm(
37163716
// fusion kinds that can be combined with the rms_norm computation in a single pass.
37173717
// extend this enum when adding new fused variants (e.g. FUSE_ADD, FUSE_MUL_ADD, ...).
37183718
enum ggml_rms_norm_fuse_op {
3719-
GGML_RMS_NORM_FUSE_NONE,
3720-
GGML_RMS_NORM_FUSE_MUL,
3719+
GGML_RMS_NORM_FUSE_OP_NONE,
3720+
GGML_RMS_NORM_FUSE_OP_MUL,
37213721
};
37223722

37233723
template <ggml_rms_norm_fuse_op FUSE_OP>
@@ -3730,7 +3730,7 @@ static void ggml_compute_forward_rms_norm_f32(
37303730
const ggml_tensor * src1 = nullptr;
37313731
ggml_tensor * dst = dst_rms_norm;
37323732

3733-
if constexpr (FUSE_OP == GGML_RMS_NORM_FUSE_MUL) {
3733+
if constexpr (FUSE_OP == GGML_RMS_NORM_FUSE_OP_MUL) {
37343734
src1 = (dst_fused->src[0] == dst_rms_norm) ? dst_fused->src[1] : dst_fused->src[0];
37353735
dst = dst_fused;
37363736
}
@@ -3768,7 +3768,7 @@ static void ggml_compute_forward_rms_norm_f32(
37683768

37693769
float * y = (float *) ((char *) dst->data + i01*nb1 + i02*nb2 + i03*nb3);
37703770

3771-
if constexpr (FUSE_OP == GGML_RMS_NORM_FUSE_MUL) {
3771+
if constexpr (FUSE_OP == GGML_RMS_NORM_FUSE_OP_MUL) {
37723772
const int64_t i11 = i01 % ne11;
37733773
const int64_t i12 = i02 % ne12;
37743774
const int64_t i13 = i03 % ne13;
@@ -3795,7 +3795,7 @@ void ggml_compute_forward_rms_norm(
37953795
switch (src0->type) {
37963796
case GGML_TYPE_F32:
37973797
{
3798-
ggml_compute_forward_rms_norm_f32<GGML_RMS_NORM_FUSE_NONE>(params, dst);
3798+
ggml_compute_forward_rms_norm_f32<GGML_RMS_NORM_FUSE_OP_NONE>(params, dst);
37993799
} break;
38003800
default:
38013801
{
@@ -3819,7 +3819,7 @@ void ggml_compute_forward_rms_norm_mul_fused(
38193819
switch (src0->type) {
38203820
case GGML_TYPE_F32:
38213821
{
3822-
ggml_compute_forward_rms_norm_f32<GGML_RMS_NORM_FUSE_MUL>(params, dst_rms_norm, dst_mul);
3822+
ggml_compute_forward_rms_norm_f32<GGML_RMS_NORM_FUSE_OP_MUL>(params, dst_rms_norm, dst_mul);
38233823
} break;
38243824
default:
38253825
{

0 commit comments

Comments
 (0)