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

cuDNN makefile changes

Open rosslwheeler opened this issue 1 year ago • 2 comments

Small cleanup changes on the build for cudnn. Added Windows support for cudnn. Tested on Ubuntu 22.04 and Windows 11.

  • Command line and Windows changes - (top part of the Makefile) Change from := to ?= so we can override the CUDNN_FRONTEND_PATH from the command line. (Upcoming: Fixing the locations for the CUDNN_FRONTEND_PATH for Windows and Linux to search for both $(HOME) or inside of llm.c directory)

  • cuDNN Windows support (in the middle of the Makefile)

  • Makefile cleanup - (lower part of Makefile) change "$<" to "$^" to pull in ALL of the dependencies. This eliminates the need to put (NVCC_CUDNN) on the recipe line. Removed linker files from object file compilation recipe.

rosslwheeler avatar May 05 '24 06:05 rosslwheeler

I'm not amazing at Makefiles maybe there is a bit of a reasoning around what the changes here are and why they make sense?

karpathy avatar May 05 '24 21:05 karpathy

@karpathy - notes on the above changes:

  • Command line and Windows changes - (top part of the Makefile) Change from := to ?= so we can override the CUDNN_FRONTEND_PATH from the command line. Fixing the locations for the CUDNN_FRONTEND_PATH to (HOMEDRIVE+HOMEPATH - as mentioned above - and current directory) for Windows and Linux.

  • cuDNN Windows support (in the middle of the Makefile)

  • Makefile cleanup - (lower part of Makefile) change "$<" to "$^" to pull in ALL of the dependencies. This eliminates the need to put (NVCC_CUDNN) on the recipe line. Removed linker files from object file compilation recipe.

rosslwheeler avatar May 06 '24 06:05 rosslwheeler