build_cuda.ps1 873 B

123456789101112131415161718192021222324
  1. nvcc -t 12 `
  2. --generate-code=arch=compute_50,code=[compute_50,sm_50] `
  3. --generate-code=arch=compute_52,code=[compute_52,sm_52] `
  4. --generate-code=arch=compute_61,code=[compute_61,sm_61] `
  5. --generate-code=arch=compute_70,code=[compute_70,sm_70] `
  6. --generate-code=arch=compute_75,code=[compute_75,sm_75] `
  7. --generate-code=arch=compute_80,code=[compute_80,sm_80] `
  8. -DGGML_CUDA_DMMV_X=32 `
  9. -DGGML_CUDA_PEER_MAX_BATCH_SIZE=128 `
  10. -DGGML_CUDA_MMV_Y=1 `
  11. -DGGML_USE_CUDA=1 `
  12. -DGGML_SHARED=1 `
  13. -DGGML_BUILD=1 `
  14. -DGGML_USE_LLAMAFILE `
  15. -Wno-deprecated-gpu-targets `
  16. --forward-unknown-to-host-compiler `
  17. -use_fast_math `
  18. -link `
  19. -shared `
  20. -I. `
  21. -lcuda -lcublas -lcudart -lcublasLt `
  22. -O3 `
  23. -o ggml-cuda.dll `
  24. ggml-cuda.cu ggml-cuda/*.cu ggml.c ggml-backend.c ggml-alloc.c ggml-quants.c sgemm.cpp