Skip to content

Commit 3bcb9ba

Browse files
committed
remove unused variables
1 parent b0fc807 commit 3bcb9ba

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

train_gpt2.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -825,17 +825,11 @@ void gpt2_backward(GPT2 *model) {
825825

826826
// get the pointers of the weights for this layer
827827
float* l_ln1w = params.ln1w + l * C;
828-
float* l_ln1b = params.ln1b + l * C;
829828
float* l_qkvw = params.qkvw + l * 3*C * C;
830-
float* l_qkvb = params.qkvb + l * 3*C;
831829
float* l_attprojw = params.attprojw + l * C * C;
832-
float* l_attprojb = params.attprojb + l * C;
833830
float* l_ln2w = params.ln2w + l * C;
834-
float* l_ln2b = params.ln2b + l * C;
835831
float* l_fcw = params.fcw + l * 4*C * C;
836-
float* l_fcb = params.fcb + l * 4*C;
837832
float* l_fcprojw = params.fcprojw + l * C * 4*C;
838-
float* l_fcprojb = params.fcprojb + l * C;
839833
// get the pointers of the gradients of the weights for this layer
840834
float* dl_ln1w = grads.ln1w + l * C;
841835
float* dl_ln1b = grads.ln1b + l * C;
@@ -855,17 +849,13 @@ void gpt2_backward(GPT2 *model) {
855849
float* l_ln1_rstd = acts.ln1_rstd + l * B * T;
856850
float* l_qkv = acts.qkv + l * B * T * 3*C;
857851
float* l_atty = acts.atty + l * B * T * C;
858-
float* l_preatt = acts.preatt + l * B * NH * T * T;
859852
float* l_att = acts.att + l * B * NH * T * T;
860-
float* l_attproj = acts.attproj + l * B * T * C;
861853
float* l_residual2 = acts.residual2 + l * B * T * C;
862854
float* l_ln2 = acts.ln2 + l * B * T * C;
863855
float* l_ln2_mean = acts.ln2_mean + l * B * T;
864856
float* l_ln2_rstd = acts.ln2_rstd + l * B * T;
865857
float* l_fch = acts.fch + l * B * T * 4*C;
866858
float* l_fch_gelu = acts.fch_gelu + l * B * T * 4*C;
867-
float* l_fcproj = acts.fcproj + l * B * T * C;
868-
float* l_residual3 = acts.residual3 + l * B * T * C;
869859
// get the pointers of the gradients of the activations for this layer
870860
float* dl_ln1 = grads_acts.ln1 + l * B * T * C;
871861
float* dl_qkv = grads_acts.qkv + l * B * T * 3*C;

0 commit comments

Comments
 (0)