Skip to content

Commit

Permalink
Merge pull request #639 from rosslwheeler/bug_fixes/windows_clean_up
Browse files Browse the repository at this point in the history
Add unistd.h to fix Windows cuDNN build
  • Loading branch information
karpathy authored Jun 25, 2024
2 parents be7a278 + 53985a7 commit 1f49cc1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions dev/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#define WIN32_LEAN_AND_MEAN

#include <stdio.h>
#include <math.h>
Expand Down
1 change: 1 addition & 0 deletions llmc/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifndef UTILS_H
#define UTILS_H

#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down
5 changes: 0 additions & 5 deletions train_gpt2.cu
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
/*
GPT-2 Transformer Neural Net training loop. See README.md for usage.
*/

#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#endif

#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down

0 comments on commit 1f49cc1

Please sign in to comment.