build_cuda.sh 906 B

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