llm.c icon indicating copy to clipboard operation
llm.c copied to clipboard

Building on Windows

Open azret opened this issue 10 months ago • 3 comments

Minimum set of support files to build on Windows. Use build_msvc.bat in a Visual Studio Command x64 Prompt to build with MSVC.

See #19 for some comments re /fp:fast and /O

https://github.com/karpathy/llm.c/issues/19#issuecomment-2053990872

azret avatar Apr 15 '24 04:04 azret

@azret - thanks but there are still some other changes needed to support OpenMP 5.2. Will create a new PR for this per comments in https://github.com/karpathy/llm.c/pull/118

rosslwheeler avatar Apr 15 '24 05:04 rosslwheeler

OpenMP

Yeah. We'll need add the OpenMP option as well. For now just copy this files locally and add it in the build_msvc.bat.

e.g. cl.exe /openmp /O2 /fp:fast /I. /I .\dev\win test_gpt2.c

I'll add the CUDA build scripts later tomorrow. (For now in Visual Studio create a new CUDA project and add the needed files)

azret avatar Apr 15 '24 05:04 azret

@azret - the changes are in the PR already. Just creating a smaller version. Thanks.

rosslwheeler avatar Apr 15 '24 05:04 rosslwheeler

Closing this. See #19

azret avatar Apr 20 '24 19:04 azret