Skip to content

Commit ddcd204

Browse files
committed
layernorm: use mold for temp allocation
1 parent c2a1e70 commit ddcd204

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nf/nf_layernorm_submodule.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pure module subroutine forward(self, input)
1414
real, allocatable :: normalized(:, :)
1515
integer :: i
1616

17-
allocate(normalized(self % sequence_length, self % model_dimension))
17+
allocate(normalized, mold=self % mu)
1818

1919
! mu = x - MEAN_last_dim(x)
2020
do concurrent(i = 1: self % model_dimension)

0 commit comments

Comments
 (0)