From 2e6fd9b1503f7065307f7c664f534e70fc79cce0 Mon Sep 17 00:00:00 2001 From: Ross Wheeler Date: Tue, 25 Jun 2024 10:36:16 -0700 Subject: [PATCH 1/2] Add unistd.h for Windows cuDNN build Small fix - move WIN32 change into dev.unistd.h Add USE_CUDNN=1 build for Windows for CI --- .github/workflows/ci.yml | 1 + dev/unistd.h | 1 + llmc/utils.h | 1 + train_gpt2.cu | 5 ----- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27ebad6..633acfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,6 +138,7 @@ jobs: run: | call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" make-4.4.1\dist\make -j WIN_CI_BUILD=1 train_gpt2fp32cu test_gpt2fp32cu test_gpt2cu train_gpt2cu profile_gpt2cu + make-4.4.1\dist\make -j WIN_CI_BUILD=1 USE_CUDNN=1 train_gpt2fp32cu test_gpt2fp32cu test_gpt2cu train_gpt2cu profile_gpt2cu build-ubuntu20-04: runs-on: ubuntu-20.04 diff --git a/dev/unistd.h b/dev/unistd.h index 411757f..6ff68be 100644 --- a/dev/unistd.h +++ b/dev/unistd.h @@ -4,6 +4,7 @@ #define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES +#define WIN32_LEAN_AND_MEAN #include #include diff --git a/llmc/utils.h b/llmc/utils.h index 74a06d2..e09bdce 100644 --- a/llmc/utils.h +++ b/llmc/utils.h @@ -7,6 +7,7 @@ #ifndef UTILS_H #define UTILS_H +#include #include #include #include diff --git a/train_gpt2.cu b/train_gpt2.cu index 301cbea..7060923 100644 --- a/train_gpt2.cu +++ b/train_gpt2.cu @@ -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 #include #include From 53985a77f404762e8af02c03f2215df1a9b93a01 Mon Sep 17 00:00:00 2001 From: Ross Wheeler Date: Tue, 25 Jun 2024 10:43:06 -0700 Subject: [PATCH 2/2] CI for Windows needs cuDNN installed - revert --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 633acfe..27ebad6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,7 +138,6 @@ jobs: run: | call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvars64.bat" make-4.4.1\dist\make -j WIN_CI_BUILD=1 train_gpt2fp32cu test_gpt2fp32cu test_gpt2cu train_gpt2cu profile_gpt2cu - make-4.4.1\dist\make -j WIN_CI_BUILD=1 USE_CUDNN=1 train_gpt2fp32cu test_gpt2fp32cu test_gpt2cu train_gpt2cu profile_gpt2cu build-ubuntu20-04: runs-on: ubuntu-20.04