Skip to content

Commit 2ddf128

Browse files
authored
Merge pull request karpathy#615 from gordicaleksa/relax_grad_tests
Relax grad tensor thresholds in tests
2 parents fd564f7 + 8079bd9 commit 2ddf128

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test_gpt2.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ int main(int argc, char *argv[]) {
258258
// Also, different GPUs may use different matrix multiplication algorithms, so the
259259
// actual errors can be hardware specific.
260260

261-
float grad_thresholds[NUM_PARAMETER_TENSORS] = {5e-1f, 4e-3f, 1e-1f, 3e-2f, 1.5e-2f, 3e-2f, 5e-2f, 5e-2f, 5e-2f, 1.5e-2f, 5e-4f, 8e-3f, 1e-3f, 2.5e-3f, 1e-1f, 2e-2f};
261+
float grad_thresholds[NUM_PARAMETER_TENSORS] = {5e-1f, 4e-3f, 1e-1f, 3.5e-2f, 2e-2f, 3e-2f, 5e-2f, 5e-2f, 5e-2f, 1.5e-2f, 5e-4f, 8e-3f, 1.5e-3f, 2.5e-3f, 1e-1f, 2e-2f};
262262
#if defined(ENABLE_FP32)
263263
for (int i = 0; i < NUM_PARAMETER_TENSORS; i++) {
264264
grad_thresholds[i] = 1e-6f; // we can be much more precise in FP32

0 commit comments

Comments
 (0)