Skip to content

Commit 26986bb

Browse files
authored
Fix type typo in rmsnorm (PaddlePaddle#1119)
Initially the variable `h4` is `half4`, but its last two fields are not used. Based on the semantics and the context, I believe it should be `half2`.
1 parent 7d8317a commit 26986bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/util/include/cutlass/util/device_rmsnorm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ __global__ void rmsnorm_twoPassAlgo_e8(float4 *output, const float4 *input,
9898
half2 *h1 = (half2 *)&tmp.x;
9999
half2 *h2 = (half2 *)&tmp.y;
100100
half2 *h3 = (half2 *)&tmp.z;
101-
half4 *h4 = (half4 *)&tmp.w;
101+
half2 *h4 = (half2 *)&tmp.w;
102102

103103
h1->x = half(static_cast<float>(l1->x) * s_mean * static_cast<float>(g1->x));
104104
h1->y = half(static_cast<float>(l1->y) * s_mean * static_cast<float>(g1->y));

0 commit comments

Comments
 (0)