Skip to content

Commit

Permalink
Lower epsilone for all grads check
Browse files Browse the repository at this point in the history
  • Loading branch information
azret committed Apr 26, 2024
1 parent a0b93ac commit ea2c871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test_gpt2_fp32.cu
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ int main(int argc, char *argv[]) {
}

// compare the gradients ona the parameters all at once
// cudaMemcpy(calculated_grads_memory, model.grads_memory, model.num_parameters * sizeof(float), cudaMemcpyDeviceToHost);
// check_tensor(calculated_grads_memory, expected_grads_memory, model.num_parameters, "grads");
cudaMemcpy(calculated_grads_memory, model.grads_memory, model.num_parameters * sizeof(float), cudaMemcpyDeviceToHost);
check_tensor(calculated_grads_memory, expected_grads_memory, model.num_parameters, "all grads", 1.3e-04);
}

gpt2_update(&model, 1e-4f, 0.9f, 0.999f, 1e-8f, 0.01f, step+1);
Expand Down

0 comments on commit ea2c871

Please sign in to comment.