@fugood/llama.node 0.3.16 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (281) hide show
  1. package/CMakeLists.txt +6 -1
  2. package/bin/darwin/arm64/llama-node.node +0 -0
  3. package/bin/darwin/x64/llama-node.node +0 -0
  4. package/bin/linux/arm64/llama-node.node +0 -0
  5. package/bin/linux/x64/llama-node.node +0 -0
  6. package/bin/linux-cuda/arm64/llama-node.node +0 -0
  7. package/bin/linux-cuda/x64/llama-node.node +0 -0
  8. package/bin/linux-vulkan/arm64/llama-node.node +0 -0
  9. package/bin/linux-vulkan/x64/llama-node.node +0 -0
  10. package/bin/win32/arm64/llama-node.node +0 -0
  11. package/bin/win32/arm64/node.lib +0 -0
  12. package/bin/win32/x64/llama-node.node +0 -0
  13. package/bin/win32/x64/node.lib +0 -0
  14. package/bin/win32-vulkan/arm64/llama-node.node +0 -0
  15. package/bin/win32-vulkan/arm64/node.lib +0 -0
  16. package/bin/win32-vulkan/x64/llama-node.node +0 -0
  17. package/bin/win32-vulkan/x64/node.lib +0 -0
  18. package/lib/binding.ts +44 -2
  19. package/lib/index.js +132 -1
  20. package/lib/index.ts +203 -3
  21. package/package.json +2 -1
  22. package/src/EmbeddingWorker.cpp +1 -1
  23. package/src/LlamaCompletionWorker.cpp +374 -19
  24. package/src/LlamaCompletionWorker.h +31 -10
  25. package/src/LlamaContext.cpp +216 -7
  26. package/src/LlamaContext.h +12 -0
  27. package/src/common.hpp +15 -0
  28. package/src/llama.cpp/.github/workflows/build-linux-cross.yml +233 -0
  29. package/src/llama.cpp/.github/workflows/build.yml +89 -767
  30. package/src/llama.cpp/.github/workflows/docker.yml +9 -6
  31. package/src/llama.cpp/.github/workflows/release.yml +716 -0
  32. package/src/llama.cpp/.github/workflows/server.yml +19 -23
  33. package/src/llama.cpp/CMakeLists.txt +11 -1
  34. package/src/llama.cpp/cmake/build-info.cmake +8 -2
  35. package/src/llama.cpp/cmake/x64-windows-llvm.cmake +0 -6
  36. package/src/llama.cpp/common/CMakeLists.txt +35 -4
  37. package/src/llama.cpp/common/arg.cpp +844 -121
  38. package/src/llama.cpp/common/arg.h +9 -0
  39. package/src/llama.cpp/common/chat.cpp +129 -107
  40. package/src/llama.cpp/common/chat.h +2 -0
  41. package/src/llama.cpp/common/common.cpp +64 -518
  42. package/src/llama.cpp/common/common.h +35 -45
  43. package/src/llama.cpp/common/json-schema-to-grammar.cpp +3 -0
  44. package/src/llama.cpp/common/llguidance.cpp +31 -47
  45. package/src/llama.cpp/common/minja/chat-template.hpp +23 -11
  46. package/src/llama.cpp/common/minja/minja.hpp +186 -127
  47. package/src/llama.cpp/common/regex-partial.cpp +204 -0
  48. package/src/llama.cpp/common/regex-partial.h +56 -0
  49. package/src/llama.cpp/common/sampling.cpp +60 -50
  50. package/src/llama.cpp/docs/build.md +122 -7
  51. package/src/llama.cpp/examples/CMakeLists.txt +2 -32
  52. package/src/llama.cpp/examples/batched/batched.cpp +1 -1
  53. package/src/llama.cpp/examples/embedding/embedding.cpp +9 -12
  54. package/src/llama.cpp/examples/gritlm/gritlm.cpp +1 -1
  55. package/src/llama.cpp/examples/llama.android/llama/build.gradle.kts +1 -0
  56. package/src/llama.cpp/examples/parallel/parallel.cpp +89 -15
  57. package/src/llama.cpp/examples/passkey/passkey.cpp +1 -1
  58. package/src/llama.cpp/examples/speculative/speculative.cpp +1 -1
  59. package/src/llama.cpp/examples/speculative-simple/speculative-simple.cpp +1 -1
  60. package/src/llama.cpp/examples/sycl/build.sh +2 -2
  61. package/src/llama.cpp/examples/sycl/win-build-sycl.bat +2 -2
  62. package/src/llama.cpp/examples/training/CMakeLists.txt +5 -0
  63. package/src/llama.cpp/examples/training/finetune.cpp +96 -0
  64. package/src/llama.cpp/ggml/CMakeLists.txt +35 -2
  65. package/src/llama.cpp/ggml/cmake/GitVars.cmake +22 -0
  66. package/src/llama.cpp/ggml/include/ggml-backend.h +4 -4
  67. package/src/llama.cpp/ggml/include/ggml-cpp.h +1 -1
  68. package/src/llama.cpp/ggml/include/ggml-cpu.h +5 -0
  69. package/src/llama.cpp/ggml/include/ggml-opt.h +47 -28
  70. package/src/llama.cpp/ggml/include/ggml-rpc.h +6 -1
  71. package/src/llama.cpp/ggml/include/ggml.h +76 -106
  72. package/src/llama.cpp/ggml/src/CMakeLists.txt +11 -8
  73. package/src/llama.cpp/ggml/src/ggml-alloc.c +4 -1
  74. package/src/llama.cpp/ggml/src/ggml-backend.cpp +9 -5
  75. package/src/llama.cpp/ggml/src/ggml-cann/CMakeLists.txt +0 -2
  76. package/src/llama.cpp/ggml/src/ggml-cann/acl_tensor.cpp +8 -4
  77. package/src/llama.cpp/ggml/src/ggml-cann/acl_tensor.h +5 -5
  78. package/src/llama.cpp/ggml/src/ggml-cann/aclnn_ops.cpp +692 -1534
  79. package/src/llama.cpp/ggml/src/ggml-cann/aclnn_ops.h +613 -122
  80. package/src/llama.cpp/ggml/src/ggml-cann/common.h +135 -1
  81. package/src/llama.cpp/ggml/src/ggml-cann/ggml-cann.cpp +507 -137
  82. package/src/llama.cpp/ggml/src/ggml-common.h +12 -6
  83. package/src/llama.cpp/ggml/src/ggml-cpu/CMakeLists.txt +66 -33
  84. package/src/llama.cpp/ggml/src/ggml-cpu/binary-ops.cpp +158 -0
  85. package/src/llama.cpp/ggml/src/ggml-cpu/binary-ops.h +16 -0
  86. package/src/llama.cpp/ggml/src/ggml-cpu/common.h +72 -0
  87. package/src/llama.cpp/ggml/src/ggml-cpu/cpu-feats-x86.cpp +1 -1
  88. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-aarch64.cpp +896 -194
  89. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-impl.h +2 -21
  90. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu-quants.c +1060 -410
  91. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.c +1008 -13533
  92. package/src/llama.cpp/ggml/src/ggml-cpu/ggml-cpu.cpp +31 -16
  93. package/src/llama.cpp/ggml/src/ggml-cpu/kleidiai/kernels.cpp +90 -12
  94. package/src/llama.cpp/ggml/src/ggml-cpu/kleidiai/kernels.h +47 -13
  95. package/src/llama.cpp/ggml/src/ggml-cpu/kleidiai/kleidiai.cpp +266 -72
  96. package/src/llama.cpp/ggml/src/ggml-cpu/llamafile/sgemm.cpp +1034 -88
  97. package/src/llama.cpp/ggml/src/ggml-cpu/ops.cpp +8796 -0
  98. package/src/llama.cpp/ggml/src/ggml-cpu/ops.h +110 -0
  99. package/src/llama.cpp/ggml/src/ggml-cpu/simd-mappings.h +892 -0
  100. package/src/llama.cpp/ggml/src/ggml-cpu/unary-ops.cpp +186 -0
  101. package/src/llama.cpp/ggml/src/ggml-cpu/unary-ops.h +28 -0
  102. package/src/llama.cpp/ggml/src/ggml-cpu/vec.cpp +252 -0
  103. package/src/llama.cpp/ggml/src/ggml-cpu/vec.h +802 -0
  104. package/src/llama.cpp/ggml/src/ggml-cuda/CMakeLists.txt +23 -4
  105. package/src/llama.cpp/ggml/src/ggml-cuda/vendors/hip.h +7 -0
  106. package/src/llama.cpp/ggml/src/ggml-cuda/vendors/musa.h +1 -0
  107. package/src/llama.cpp/ggml/src/ggml-hip/CMakeLists.txt +0 -4
  108. package/src/llama.cpp/ggml/src/ggml-impl.h +52 -18
  109. package/src/llama.cpp/ggml/src/ggml-metal/ggml-metal-impl.h +106 -14
  110. package/src/llama.cpp/ggml/src/ggml-opencl/CMakeLists.txt +67 -119
  111. package/src/llama.cpp/ggml/src/ggml-opencl/ggml-opencl.cpp +1023 -262
  112. package/src/llama.cpp/ggml/src/ggml-opt.cpp +368 -190
  113. package/src/llama.cpp/ggml/src/ggml-quants.c +0 -6
  114. package/src/llama.cpp/ggml/src/ggml-rpc/ggml-rpc.cpp +307 -40
  115. package/src/llama.cpp/ggml/src/ggml-sycl/CMakeLists.txt +125 -45
  116. package/src/llama.cpp/ggml/src/ggml-sycl/backend.hpp +10 -8
  117. package/src/llama.cpp/ggml/src/ggml-sycl/binbcast.cpp +239 -0
  118. package/src/llama.cpp/ggml/src/ggml-sycl/binbcast.hpp +39 -0
  119. package/src/llama.cpp/ggml/src/ggml-sycl/common.cpp +0 -35
  120. package/src/llama.cpp/ggml/src/ggml-sycl/common.hpp +9 -307
  121. package/src/llama.cpp/ggml/src/ggml-sycl/convert.cpp +72 -25
  122. package/src/llama.cpp/ggml/src/ggml-sycl/convert.hpp +14 -7
  123. package/src/llama.cpp/ggml/src/ggml-sycl/dequantize.hpp +59 -21
  124. package/src/llama.cpp/ggml/src/ggml-sycl/dmmv.cpp +7 -1
  125. package/src/llama.cpp/ggml/src/ggml-sycl/dpct/helper.hpp +79 -90
  126. package/src/llama.cpp/ggml/src/ggml-sycl/element_wise.cpp +944 -438
  127. package/src/llama.cpp/ggml/src/ggml-sycl/element_wise.hpp +22 -23
  128. package/src/llama.cpp/ggml/src/ggml-sycl/gemm.hpp +37 -8
  129. package/src/llama.cpp/ggml/src/ggml-sycl/getrows.cpp +24 -20
  130. package/src/llama.cpp/ggml/src/ggml-sycl/getrows.hpp +1 -4
  131. package/src/llama.cpp/ggml/src/ggml-sycl/ggml-sycl.cpp +507 -411
  132. package/src/llama.cpp/ggml/src/ggml-sycl/im2col.cpp +84 -74
  133. package/src/llama.cpp/ggml/src/ggml-sycl/im2col.hpp +1 -3
  134. package/src/llama.cpp/ggml/src/ggml-sycl/mmvq.cpp +185 -89
  135. package/src/llama.cpp/ggml/src/ggml-sycl/norm.cpp +37 -49
  136. package/src/llama.cpp/ggml/src/ggml-sycl/norm.hpp +7 -22
  137. package/src/llama.cpp/ggml/src/ggml-sycl/outprod.cpp +4 -14
  138. package/src/llama.cpp/ggml/src/ggml-sycl/quants.hpp +83 -0
  139. package/src/llama.cpp/ggml/src/ggml-sycl/rope.cpp +204 -118
  140. package/src/llama.cpp/ggml/src/ggml-sycl/rope.hpp +1 -3
  141. package/src/llama.cpp/ggml/src/ggml-sycl/vecdotq.hpp +128 -53
  142. package/src/llama.cpp/ggml/src/ggml-vulkan/CMakeLists.txt +83 -49
  143. package/src/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp +1278 -282
  144. package/src/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders/CMakeLists.txt +32 -0
  145. package/src/llama.cpp/ggml/src/ggml-vulkan/vulkan-shaders/vulkan-shaders-gen.cpp +133 -30
  146. package/src/llama.cpp/ggml/src/ggml.c +170 -265
  147. package/src/llama.cpp/ggml/src/gguf.cpp +34 -33
  148. package/src/llama.cpp/include/llama.h +82 -22
  149. package/src/llama.cpp/models/ggml-vocab-llama4.gguf.inp +112 -0
  150. package/src/llama.cpp/models/ggml-vocab-llama4.gguf.out +46 -0
  151. package/src/llama.cpp/models/ggml-vocab-pixtral.gguf.inp +112 -0
  152. package/src/llama.cpp/models/ggml-vocab-pixtral.gguf.out +46 -0
  153. package/src/llama.cpp/requirements/requirements-all.txt +5 -3
  154. package/src/llama.cpp/requirements/requirements-gguf_editor_gui.txt +3 -0
  155. package/src/llama.cpp/scripts/xxd.cmake +1 -1
  156. package/src/llama.cpp/src/CMakeLists.txt +4 -2
  157. package/src/llama.cpp/src/llama-adapter.cpp +43 -1
  158. package/src/llama.cpp/src/llama-arch.cpp +163 -17
  159. package/src/llama.cpp/src/llama-arch.h +16 -0
  160. package/src/llama.cpp/src/llama-batch.cpp +5 -1
  161. package/src/llama.cpp/src/llama-batch.h +2 -1
  162. package/src/llama.cpp/src/llama-chat.cpp +91 -16
  163. package/src/llama.cpp/src/llama-chat.h +7 -2
  164. package/src/llama.cpp/src/llama-context.cpp +479 -575
  165. package/src/llama.cpp/src/llama-context.h +44 -33
  166. package/src/llama.cpp/src/llama-cparams.h +1 -0
  167. package/src/llama.cpp/src/llama-graph.cpp +209 -157
  168. package/src/llama.cpp/src/llama-graph.h +38 -14
  169. package/src/llama.cpp/src/llama-hparams.h +13 -0
  170. package/src/llama.cpp/src/llama-kv-cache.cpp +1604 -543
  171. package/src/llama.cpp/src/llama-kv-cache.h +283 -171
  172. package/src/llama.cpp/src/llama-memory.h +12 -2
  173. package/src/llama.cpp/src/llama-mmap.cpp +1 -1
  174. package/src/llama.cpp/src/llama-model-loader.cpp +34 -20
  175. package/src/llama.cpp/src/llama-model-loader.h +5 -3
  176. package/src/llama.cpp/src/llama-model-saver.cpp +281 -0
  177. package/src/llama.cpp/src/llama-model-saver.h +37 -0
  178. package/src/llama.cpp/src/llama-model.cpp +1803 -330
  179. package/src/llama.cpp/src/llama-model.h +21 -2
  180. package/src/llama.cpp/src/llama-quant.cpp +33 -10
  181. package/src/llama.cpp/src/llama-sampling.cpp +25 -7
  182. package/src/llama.cpp/src/llama-vocab.cpp +86 -10
  183. package/src/llama.cpp/src/llama-vocab.h +6 -0
  184. package/src/llama.cpp/src/llama.cpp +15 -1
  185. package/src/llama.cpp/tests/CMakeLists.txt +52 -31
  186. package/src/llama.cpp/tests/test-arg-parser.cpp +51 -4
  187. package/src/llama.cpp/tests/test-backend-ops.cpp +189 -90
  188. package/src/llama.cpp/tests/test-chat-template.cpp +26 -6
  189. package/src/llama.cpp/tests/test-chat.cpp +15 -3
  190. package/src/llama.cpp/{examples/gbnf-validator/gbnf-validator.cpp → tests/test-gbnf-validator.cpp} +2 -2
  191. package/src/llama.cpp/tests/test-grammar-integration.cpp +3 -2
  192. package/src/llama.cpp/tests/test-grammar-llguidance.cpp +63 -2
  193. package/src/llama.cpp/tests/test-grammar-parser.cpp +3 -1
  194. package/src/llama.cpp/tests/test-json-schema-to-grammar.cpp +17 -1
  195. package/src/llama.cpp/tests/test-llama-grammar.cpp +2 -1
  196. package/src/llama.cpp/tests/test-mtmd-c-api.c +63 -0
  197. package/src/llama.cpp/tests/test-opt.cpp +33 -21
  198. package/src/llama.cpp/{examples/quantize-stats/quantize-stats.cpp → tests/test-quantize-stats.cpp} +3 -1
  199. package/src/llama.cpp/tests/test-regex-partial.cpp +288 -0
  200. package/src/llama.cpp/tests/test-sampling.cpp +1 -1
  201. package/src/llama.cpp/tests/test-tokenizer-1-bpe.cpp +2 -1
  202. package/src/llama.cpp/tests/test-tokenizer-1-spm.cpp +2 -1
  203. package/src/llama.cpp/tools/CMakeLists.txt +39 -0
  204. package/src/llama.cpp/{examples → tools}/batched-bench/batched-bench.cpp +3 -3
  205. package/src/llama.cpp/{examples → tools}/export-lora/export-lora.cpp +1 -1
  206. package/src/llama.cpp/{examples → tools}/gguf-split/gguf-split.cpp +15 -16
  207. package/src/llama.cpp/{examples → tools}/imatrix/imatrix.cpp +11 -9
  208. package/src/llama.cpp/{examples → tools}/llama-bench/llama-bench.cpp +623 -274
  209. package/src/llama.cpp/{examples → tools}/main/main.cpp +22 -14
  210. package/src/llama.cpp/tools/mtmd/CMakeLists.txt +47 -0
  211. package/src/llama.cpp/tools/mtmd/clip-impl.h +365 -0
  212. package/src/llama.cpp/tools/mtmd/clip.cpp +3646 -0
  213. package/src/llama.cpp/tools/mtmd/clip.h +99 -0
  214. package/src/llama.cpp/tools/mtmd/deprecation-warning.cpp +22 -0
  215. package/src/llama.cpp/tools/mtmd/mtmd-cli.cpp +370 -0
  216. package/src/llama.cpp/tools/mtmd/mtmd-helper.cpp +310 -0
  217. package/src/llama.cpp/tools/mtmd/mtmd.cpp +678 -0
  218. package/src/llama.cpp/tools/mtmd/mtmd.h +331 -0
  219. package/src/llama.cpp/{examples → tools}/perplexity/perplexity.cpp +21 -5
  220. package/src/llama.cpp/{examples → tools}/quantize/quantize.cpp +53 -3
  221. package/src/llama.cpp/tools/rpc/CMakeLists.txt +4 -0
  222. package/src/llama.cpp/tools/rpc/rpc-server.cpp +322 -0
  223. package/src/llama.cpp/tools/run/CMakeLists.txt +16 -0
  224. package/src/llama.cpp/{examples → tools}/run/run.cpp +30 -30
  225. package/src/llama.cpp/{examples → tools}/server/CMakeLists.txt +2 -1
  226. package/src/llama.cpp/{examples → tools}/server/httplib.h +313 -247
  227. package/src/llama.cpp/{examples → tools}/server/server.cpp +529 -215
  228. package/src/llama.cpp/{examples → tools}/server/utils.hpp +427 -6
  229. package/src/llama.cpp/{examples → tools}/tts/tts.cpp +6 -9
  230. package/src/llama.cpp/cmake/arm64-windows-msvc.cmake +0 -6
  231. package/src/llama.cpp/examples/gbnf-validator/CMakeLists.txt +0 -5
  232. package/src/llama.cpp/examples/infill/CMakeLists.txt +0 -5
  233. package/src/llama.cpp/examples/infill/infill.cpp +0 -590
  234. package/src/llama.cpp/examples/llava/CMakeLists.txt +0 -66
  235. package/src/llama.cpp/examples/llava/android/build_64.sh +0 -8
  236. package/src/llama.cpp/examples/llava/clip-quantize-cli.cpp +0 -59
  237. package/src/llama.cpp/examples/llava/clip.cpp +0 -3206
  238. package/src/llama.cpp/examples/llava/clip.h +0 -118
  239. package/src/llama.cpp/examples/llava/gemma3-cli.cpp +0 -341
  240. package/src/llama.cpp/examples/llava/llava-cli.cpp +0 -332
  241. package/src/llama.cpp/examples/llava/llava.cpp +0 -574
  242. package/src/llama.cpp/examples/llava/llava.h +0 -49
  243. package/src/llama.cpp/examples/llava/minicpmv-cli.cpp +0 -354
  244. package/src/llama.cpp/examples/llava/qwen2vl-cli.cpp +0 -584
  245. package/src/llama.cpp/examples/quantize-stats/CMakeLists.txt +0 -6
  246. package/src/llama.cpp/examples/rpc/CMakeLists.txt +0 -2
  247. package/src/llama.cpp/examples/rpc/rpc-server.cpp +0 -171
  248. package/src/llama.cpp/examples/run/CMakeLists.txt +0 -5
  249. package/src/llama.cpp/ggml/src/ggml-cann/kernels/CMakeLists.txt +0 -30
  250. package/src/llama.cpp/ggml/src/ggml-cann/kernels/ascendc_kernels.h +0 -19
  251. package/src/llama.cpp/ggml/src/ggml-cann/kernels/dup.cpp +0 -234
  252. package/src/llama.cpp/ggml/src/ggml-cann/kernels/get_row_f16.cpp +0 -197
  253. package/src/llama.cpp/ggml/src/ggml-cann/kernels/get_row_f32.cpp +0 -190
  254. package/src/llama.cpp/ggml/src/ggml-cann/kernels/get_row_q4_0.cpp +0 -204
  255. package/src/llama.cpp/ggml/src/ggml-cann/kernels/get_row_q8_0.cpp +0 -191
  256. package/src/llama.cpp/ggml/src/ggml-cann/kernels/quantize_f16_q8_0.cpp +0 -218
  257. package/src/llama.cpp/ggml/src/ggml-cann/kernels/quantize_f32_q8_0.cpp +0 -216
  258. package/src/llama.cpp/ggml/src/ggml-cann/kernels/quantize_float_to_q4_0.cpp +0 -295
  259. /package/src/llama.cpp/{examples → tools}/batched-bench/CMakeLists.txt +0 -0
  260. /package/src/llama.cpp/{examples → tools}/cvector-generator/CMakeLists.txt +0 -0
  261. /package/src/llama.cpp/{examples → tools}/cvector-generator/completions.txt +0 -0
  262. /package/src/llama.cpp/{examples → tools}/cvector-generator/cvector-generator.cpp +0 -0
  263. /package/src/llama.cpp/{examples → tools}/cvector-generator/mean.hpp +0 -0
  264. /package/src/llama.cpp/{examples → tools}/cvector-generator/negative.txt +0 -0
  265. /package/src/llama.cpp/{examples → tools}/cvector-generator/pca.hpp +0 -0
  266. /package/src/llama.cpp/{examples → tools}/cvector-generator/positive.txt +0 -0
  267. /package/src/llama.cpp/{examples → tools}/export-lora/CMakeLists.txt +0 -0
  268. /package/src/llama.cpp/{examples → tools}/gguf-split/CMakeLists.txt +0 -0
  269. /package/src/llama.cpp/{examples → tools}/imatrix/CMakeLists.txt +0 -0
  270. /package/src/llama.cpp/{examples → tools}/llama-bench/CMakeLists.txt +0 -0
  271. /package/src/llama.cpp/{examples → tools}/main/CMakeLists.txt +0 -0
  272. /package/src/llama.cpp/{examples/llava → tools/mtmd}/requirements.txt +0 -0
  273. /package/src/llama.cpp/{examples → tools}/perplexity/CMakeLists.txt +0 -0
  274. /package/src/llama.cpp/{examples → tools}/quantize/CMakeLists.txt +0 -0
  275. /package/src/llama.cpp/{examples → tools}/run/linenoise.cpp/linenoise.cpp +0 -0
  276. /package/src/llama.cpp/{examples → tools}/run/linenoise.cpp/linenoise.h +0 -0
  277. /package/src/llama.cpp/{examples → tools}/server/bench/requirements.txt +0 -0
  278. /package/src/llama.cpp/{examples → tools}/server/tests/requirements.txt +0 -0
  279. /package/src/llama.cpp/{examples → tools}/tokenize/CMakeLists.txt +0 -0
  280. /package/src/llama.cpp/{examples → tools}/tokenize/tokenize.cpp +0 -0
  281. /package/src/llama.cpp/{examples → tools}/tts/CMakeLists.txt +0 -0
@@ -2,30 +2,19 @@ name: CI
2
2
 
3
3
  on:
4
4
  workflow_dispatch: # allows manual triggering
5
- inputs:
6
- create_release:
7
- description: 'Create new release'
8
- required: true
9
- type: boolean
10
5
  push:
11
6
  branches:
12
7
  - master
13
- paths: ['.github/workflows/build.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal', '**/*.comp']
8
+ paths: ['.github/workflows/build.yml', '.github/workflows/build-linux-cross.yml', '**/CMakeLists.txt', '**/.cmake', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal', '**/*.comp']
14
9
  pull_request:
15
10
  types: [opened, synchronize, reopened]
16
- paths: ['.github/workflows/build.yml', '**/CMakeLists.txt', '**/Makefile', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal', '**/*.comp']
11
+ paths: ['.github/workflows/build.yml', '.github/workflows/build-linux-cross.yml', '**/CMakeLists.txt', '**/.cmake', '**/*.h', '**/*.hpp', '**/*.c', '**/*.cpp', '**/*.cu', '**/*.cuh', '**/*.swift', '**/*.m', '**/*.metal', '**/*.comp']
17
12
 
18
13
  concurrency:
19
14
  group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
20
15
  cancel-in-progress: true
21
16
 
22
- # Fine-grant permission
23
- # https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
24
- permissions:
25
- contents: write # for creating release
26
-
27
17
  env:
28
- BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
29
18
  GGML_NLOOP: 3
30
19
  GGML_N_THREADS: 1
31
20
  LLAMA_LOG_COLORS: 1
@@ -40,8 +29,6 @@ jobs:
40
29
  - name: Clone
41
30
  id: checkout
42
31
  uses: actions/checkout@v4
43
- with:
44
- fetch-depth: 0
45
32
 
46
33
  - name: ccache
47
34
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -54,6 +41,7 @@ jobs:
54
41
  continue-on-error: true
55
42
  run: |
56
43
  brew update
44
+ brew install curl
57
45
 
58
46
  - name: Build
59
47
  id: cmake_build
@@ -62,7 +50,6 @@ jobs:
62
50
  cmake -B build \
63
51
  -DCMAKE_BUILD_RPATH="@loader_path" \
64
52
  -DLLAMA_FATAL_WARNINGS=ON \
65
- -DLLAMA_CURL=ON \
66
53
  -DGGML_METAL_USE_BF16=ON \
67
54
  -DGGML_METAL_EMBED_LIBRARY=ON \
68
55
  -DGGML_RPC=ON
@@ -74,34 +61,6 @@ jobs:
74
61
  cd build
75
62
  ctest -L 'main|curl' --verbose --timeout 900
76
63
 
77
- - name: Determine tag name
78
- id: tag
79
- shell: bash
80
- run: |
81
- BUILD_NUMBER="$(git rev-list --count HEAD)"
82
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
83
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
84
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
85
- else
86
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
87
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
88
- fi
89
-
90
- - name: Pack artifacts
91
- id: pack_artifacts
92
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
93
- run: |
94
- cp LICENSE ./build/bin/
95
- cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
96
- zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip ./build/bin/*
97
-
98
- - name: Upload artifacts
99
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
100
- uses: actions/upload-artifact@v4
101
- with:
102
- path: llama-${{ steps.tag.outputs.name }}-bin-macos-arm64.zip
103
- name: llama-bin-macos-arm64.zip
104
-
105
64
  macOS-latest-cmake-x64:
106
65
  runs-on: macos-13
107
66
 
@@ -109,8 +68,6 @@ jobs:
109
68
  - name: Clone
110
69
  id: checkout
111
70
  uses: actions/checkout@v4
112
- with:
113
- fetch-depth: 0
114
71
 
115
72
  - name: ccache
116
73
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -123,6 +80,7 @@ jobs:
123
80
  continue-on-error: true
124
81
  run: |
125
82
  brew update
83
+ brew install curl
126
84
 
127
85
  - name: Build
128
86
  id: cmake_build
@@ -133,7 +91,6 @@ jobs:
133
91
  cmake -B build \
134
92
  -DCMAKE_BUILD_RPATH="@loader_path" \
135
93
  -DLLAMA_FATAL_WARNINGS=ON \
136
- -DLLAMA_CURL=ON \
137
94
  -DGGML_METAL=OFF \
138
95
  -DGGML_RPC=ON
139
96
  cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
@@ -144,34 +101,6 @@ jobs:
144
101
  cd build
145
102
  ctest -L main --verbose --timeout 900
146
103
 
147
- - name: Determine tag name
148
- id: tag
149
- shell: bash
150
- run: |
151
- BUILD_NUMBER="$(git rev-list --count HEAD)"
152
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
153
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
154
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
155
- else
156
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
157
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
158
- fi
159
-
160
- - name: Pack artifacts
161
- id: pack_artifacts
162
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
163
- run: |
164
- cp LICENSE ./build/bin/
165
- cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
166
- zip -r llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip ./build/bin/*
167
-
168
- - name: Upload artifacts
169
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
170
- uses: actions/upload-artifact@v4
171
- with:
172
- path: llama-${{ steps.tag.outputs.name }}-bin-macos-x64.zip
173
- name: llama-bin-macos-x64.zip
174
-
175
104
  ubuntu-cpu-cmake:
176
105
  strategy:
177
106
  matrix:
@@ -187,8 +116,6 @@ jobs:
187
116
  - name: Clone
188
117
  id: checkout
189
118
  uses: actions/checkout@v4
190
- with:
191
- fetch-depth: 0
192
119
 
193
120
  - name: ccache
194
121
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -207,7 +134,6 @@ jobs:
207
134
  run: |
208
135
  cmake -B build \
209
136
  -DLLAMA_FATAL_WARNINGS=ON \
210
- -DLLAMA_CURL=ON \
211
137
  -DGGML_RPC=ON
212
138
  cmake --build build --config Release -j $(nproc)
213
139
 
@@ -228,34 +154,6 @@ jobs:
228
154
  ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
229
155
  ./bin/llama-cli -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
230
156
 
231
- - name: Determine tag name
232
- id: tag
233
- shell: bash
234
- run: |
235
- BUILD_NUMBER="$(git rev-list --count HEAD)"
236
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
237
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
238
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
239
- else
240
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
241
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
242
- fi
243
-
244
- - name: Pack artifacts
245
- id: pack_artifacts
246
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
247
- run: |
248
- cp LICENSE ./build/bin/
249
- cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
250
- zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.zip ./build/bin/*
251
-
252
- - name: Upload artifacts
253
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
254
- uses: actions/upload-artifact@v4
255
- with:
256
- path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-${{ matrix.build }}.zip
257
- name: llama-bin-ubuntu-${{ matrix.build }}.zip
258
-
259
157
  ubuntu-latest-cmake-sanitizer:
260
158
  runs-on: ubuntu-latest
261
159
 
@@ -281,7 +179,7 @@ jobs:
281
179
  id: depends
282
180
  run: |
283
181
  sudo apt-get update
284
- sudo apt-get install build-essential
182
+ sudo apt-get install build-essential libcurl4-openssl-dev
285
183
 
286
184
  - name: Build
287
185
  id: cmake_build
@@ -322,7 +220,7 @@ jobs:
322
220
  id: depends
323
221
  run: |
324
222
  sudo apt-get update
325
- sudo apt-get install build-essential
223
+ sudo apt-get install build-essential libcurl4-openssl-dev
326
224
 
327
225
  - name: Build
328
226
  id: cmake_build
@@ -360,7 +258,7 @@ jobs:
360
258
  id: depends
361
259
  run: |
362
260
  sudo apt-get update
363
- sudo apt-get install build-essential
261
+ sudo apt-get install build-essential libcurl4-openssl-dev
364
262
 
365
263
  - name: Build
366
264
  id: cmake_build
@@ -382,8 +280,6 @@ jobs:
382
280
  - name: Clone
383
281
  id: checkout
384
282
  uses: actions/checkout@v4
385
- with:
386
- fetch-depth: 0
387
283
 
388
284
  - name: ccache
389
285
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -397,7 +293,7 @@ jobs:
397
293
  wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
398
294
  sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
399
295
  sudo apt-get update -y
400
- sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk
296
+ sudo apt-get install -y build-essential mesa-vulkan-drivers vulkan-sdk libcurl4-openssl-dev
401
297
 
402
298
  - name: Build
403
299
  id: cmake_build
@@ -411,35 +307,7 @@ jobs:
411
307
  run: |
412
308
  cd build
413
309
  # This is using llvmpipe and runs slower than other backends
414
- ctest -L main --verbose --timeout 2700
415
-
416
- - name: Determine tag name
417
- id: tag
418
- shell: bash
419
- run: |
420
- BUILD_NUMBER="$(git rev-list --count HEAD)"
421
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
422
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
423
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
424
- else
425
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
426
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
427
- fi
428
-
429
- - name: Pack artifacts
430
- id: pack_artifacts
431
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
432
- run: |
433
- cp LICENSE ./build/bin/
434
- cp examples/run/linenoise.cpp/LICENSE ./build/bin/LICENSE.linenoise.cpp
435
- zip -r llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.zip ./build/bin/*
436
-
437
- - name: Upload artifacts
438
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
439
- uses: actions/upload-artifact@v4
440
- with:
441
- path: llama-${{ steps.tag.outputs.name }}-bin-ubuntu-vulkan-x64.zip
442
- name: llama-bin-ubuntu-vulkan-x64.zip
310
+ ctest -L main --verbose --timeout 3600
443
311
 
444
312
  ubuntu-22-cmake-hip:
445
313
  runs-on: ubuntu-22.04
@@ -454,7 +322,7 @@ jobs:
454
322
  id: depends
455
323
  run: |
456
324
  sudo apt-get update
457
- sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev
325
+ sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libcurl4-openssl-dev
458
326
 
459
327
  - name: ccache
460
328
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -530,7 +398,7 @@ jobs:
530
398
  shell: bash
531
399
  run: |
532
400
  sudo apt update
533
- sudo apt install intel-oneapi-compiler-dpcpp-cpp
401
+ sudo apt install intel-oneapi-compiler-dpcpp-cpp libcurl4-openssl-dev
534
402
 
535
403
  - name: install oneAPI MKL library
536
404
  shell: bash
@@ -578,7 +446,7 @@ jobs:
578
446
  shell: bash
579
447
  run: |
580
448
  sudo apt update
581
- sudo apt install intel-oneapi-compiler-dpcpp-cpp
449
+ sudo apt install intel-oneapi-compiler-dpcpp-cpp libcurl4-openssl-dev
582
450
 
583
451
  - name: install oneAPI MKL library
584
452
  shell: bash
@@ -606,6 +474,9 @@ jobs:
606
474
  -DGGML_SYCL_F16=ON
607
475
  cmake --build build --config Release -j $(nproc)
608
476
 
477
+ build-linux-cross:
478
+ uses: ./.github/workflows/build-linux-cross.yml
479
+
609
480
  macOS-latest-cmake-ios:
610
481
  runs-on: macos-latest
611
482
 
@@ -633,7 +504,9 @@ jobs:
633
504
  cmake -B build -G Xcode \
634
505
  -DGGML_METAL_USE_BF16=ON \
635
506
  -DGGML_METAL_EMBED_LIBRARY=ON \
507
+ -DLLAMA_BUILD_COMMON=OFF \
636
508
  -DLLAMA_BUILD_EXAMPLES=OFF \
509
+ -DLLAMA_BUILD_TOOLS=OFF \
637
510
  -DLLAMA_BUILD_TESTS=OFF \
638
511
  -DLLAMA_BUILD_SERVER=OFF \
639
512
  -DCMAKE_SYSTEM_NAME=iOS \
@@ -668,7 +541,9 @@ jobs:
668
541
  cmake -B build -G Xcode \
669
542
  -DGGML_METAL_USE_BF16=ON \
670
543
  -DGGML_METAL_EMBED_LIBRARY=ON \
544
+ -DLLAMA_BUILD_COMMON=OFF \
671
545
  -DLLAMA_BUILD_EXAMPLES=OFF \
546
+ -DLLAMA_BUILD_TOOLS=OFF \
672
547
  -DLLAMA_BUILD_TESTS=OFF \
673
548
  -DLLAMA_BUILD_SERVER=OFF \
674
549
  -DCMAKE_SYSTEM_NAME=tvOS \
@@ -697,7 +572,9 @@ jobs:
697
572
  cmake -B build -G Xcode \
698
573
  -DGGML_METAL_USE_BF16=ON \
699
574
  -DGGML_METAL_EMBED_LIBRARY=ON \
575
+ -DLLAMA_BUILD_COMMON=OFF \
700
576
  -DLLAMA_BUILD_EXAMPLES=OFF \
577
+ -DLLAMA_BUILD_TOOLS=OFF \
701
578
  -DLLAMA_BUILD_TESTS=OFF \
702
579
  -DLLAMA_BUILD_SERVER=OFF \
703
580
  -DCMAKE_SYSTEM_NAME=visionOS \
@@ -736,7 +613,9 @@ jobs:
736
613
  cmake -B build -G Xcode \
737
614
  -DGGML_METAL_USE_BF16=ON \
738
615
  -DGGML_METAL_EMBED_LIBRARY=ON \
616
+ -DLLAMA_CURL=OFF \
739
617
  -DLLAMA_BUILD_EXAMPLES=OFF \
618
+ -DLLAMA_BUILD_TOOLS=OFF \
740
619
  -DLLAMA_BUILD_TESTS=OFF \
741
620
  -DLLAMA_BUILD_SERVER=OFF \
742
621
  -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
@@ -765,7 +644,7 @@ jobs:
765
644
  uses: hendrikmuhs/ccache-action@v1.2.16
766
645
  with:
767
646
  key: windows-msys2
768
- variant: sccache
647
+ variant: ccache
769
648
  evict-old-files: 1d
770
649
 
771
650
  - name: Setup ${{ matrix.sys }}
@@ -803,44 +682,34 @@ jobs:
803
682
  env:
804
683
  OPENBLAS_VERSION: 0.3.23
805
684
  SDE_VERSION: 9.33.0-2024-01-07
806
- VULKAN_VERSION: 1.4.304.1
685
+ VULKAN_VERSION: 1.4.309.0
807
686
 
808
687
  strategy:
809
688
  matrix:
810
689
  include:
811
- - build: 'noavx-x64'
812
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF'
813
- - build: 'avx2-x64'
814
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON'
815
- - build: 'avx-x64'
816
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_AVX2=OFF'
817
- - build: 'avx512-x64'
818
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_AVX512=ON'
690
+ - build: 'cpu-x64'
691
+ defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF'
819
692
  - build: 'openblas-x64'
820
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
821
- - build: 'kompute-x64'
822
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON'
693
+ defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DBLAS_INCLUDE_DIRS="$env:RUNNER_TEMP/openblas/include" -DBLAS_LIBRARIES="$env:RUNNER_TEMP/openblas/lib/openblas.lib"'
823
694
  - build: 'vulkan-x64'
824
- defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_VULKAN=ON'
695
+ defines: '-DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON'
825
696
  - build: 'llvm-arm64'
826
697
  defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
827
- - build: 'msvc-arm64'
828
- defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
829
698
  - build: 'llvm-arm64-opencl-adreno'
830
699
  defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON'
700
+ # - build: 'kompute-x64'
701
+ # defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_OPENMP=OFF -DGGML_KOMPUTE=ON -DKOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK=ON'
831
702
 
832
703
  steps:
833
704
  - name: Clone
834
705
  id: checkout
835
706
  uses: actions/checkout@v4
836
- with:
837
- fetch-depth: 0
838
707
 
839
708
  - name: ccache
840
709
  uses: hendrikmuhs/ccache-action@v1.2.16
841
710
  with:
842
711
  key: windows-latest-cmake-${{ matrix.build }}
843
- variant: sccache
712
+ variant: ccache
844
713
  evict-old-files: 1d
845
714
 
846
715
  - name: Clone Kompute submodule
@@ -896,10 +765,17 @@ jobs:
896
765
  -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"
897
766
  cmake --build build-arm64-release --target install --config release
898
767
 
768
+ - name: libCURL
769
+ id: get_libcurl
770
+ uses: ./.github/actions/windows-setup-curl
771
+
899
772
  - name: Build
900
773
  id: cmake_build
774
+ env:
775
+ CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
901
776
  run: |
902
- cmake -S . -B build ${{ matrix.defines }}
777
+ cmake -S . -B build ${{ matrix.defines }} `
778
+ -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include"
903
779
  cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
904
780
 
905
781
  - name: Add libopenblas.dll
@@ -909,67 +785,26 @@ jobs:
909
785
  cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll
910
786
  cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt
911
787
 
912
- - name: Check AVX512F support
913
- id: check_avx512f
914
- if: ${{ matrix.build == 'avx512-x64' }}
915
- continue-on-error: true
916
- run: |
917
- cd build
918
- $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
919
- $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
920
- $cl = $(join-path $msvc 'bin\Hostx64\x64\cl.exe')
921
- echo 'int main(void){unsigned int a[4];__cpuid(a,7);return !(a[1]&65536);}' >> avx512f.c
922
- & $cl /O2 /GS- /kernel avx512f.c /link /nodefaultlib /entry:main
923
- .\avx512f.exe && echo "AVX512F: YES" && ( echo HAS_AVX512F=1 >> $env:GITHUB_ENV ) || echo "AVX512F: NO"
924
-
925
788
  - name: Test
926
789
  id: cmake_test
927
- # not all machines have native AVX-512
928
- if: ${{ matrix.build != 'msvc-arm64' && matrix.build != 'llvm-arm64' && matrix.build != 'llvm-arm64-opencl-adreno' && matrix.build != 'kompute-x64' && matrix.build != 'vulkan-x64' && (matrix.build != 'avx512-x64' || env.HAS_AVX512F == '1') }}
790
+ if: ${{ matrix.build != 'llvm-arm64' && matrix.build != 'llvm-arm64-opencl-adreno' }}
929
791
  run: |
930
792
  cd build
931
793
  ctest -L main -C Release --verbose --timeout 900
932
794
 
933
- - name: Test (Intel SDE)
934
- id: cmake_test_sde
935
- if: ${{ matrix.build == 'avx512-x64' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
936
- run: |
937
- curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"
938
- # for some weird reason windows tar doesn't like sde tar.xz
939
- 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar.xz
940
- 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar
941
- $sde = $(join-path $env:RUNNER_TEMP sde-external-${env:SDE_VERSION}-win/sde.exe)
942
- cd build
943
- $env:LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR = 1
944
- & $sde -future -- ctest -L main -C Release --verbose --timeout 900
945
-
946
- - name: Determine tag name
947
- id: tag
948
- shell: bash
949
- run: |
950
- BUILD_NUMBER="$(git rev-list --count HEAD)"
951
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
952
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
953
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
954
- else
955
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
956
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
957
- fi
958
-
959
- - name: Pack artifacts
960
- id: pack_artifacts
961
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
962
- run: |
963
- Copy-Item LICENSE .\build\bin\Release\llama.cpp.txt
964
- Copy-Item .\examples\run\linenoise.cpp\LICENSE .\build\bin\Release\linenoise.cpp.txt
965
- 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip .\build\bin\Release\*
966
-
967
- - name: Upload artifacts
968
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
969
- uses: actions/upload-artifact@v4
970
- with:
971
- path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}.zip
972
- name: llama-bin-win-${{ matrix.build }}.zip
795
+ # TODO: disabled for now, consider adding tests for all CPU variants instead
796
+ # - name: Test (Intel SDE)
797
+ # id: cmake_test_sde
798
+ # if: ${{ matrix.build == 'avx512-x64' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
799
+ # run: |
800
+ # curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"
801
+ # # for some weird reason windows tar doesn't like sde tar.xz
802
+ # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar.xz
803
+ # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar
804
+ # $sde = $(join-path $env:RUNNER_TEMP sde-external-${env:SDE_VERSION}-win/sde.exe)
805
+ # cd build
806
+ # $env:LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR = 1
807
+ # & $sde -future -- ctest -L main -C Release --verbose --timeout 900
973
808
 
974
809
  ubuntu-latest-cmake-cuda:
975
810
  runs-on: ubuntu-latest
@@ -979,15 +814,13 @@ jobs:
979
814
  - name: Clone
980
815
  id: checkout
981
816
  uses: actions/checkout@v4
982
- with:
983
- fetch-depth: 0
984
817
 
985
818
  - name: Install dependencies
986
819
  env:
987
820
  DEBIAN_FRONTEND: noninteractive
988
821
  run: |
989
822
  apt update
990
- apt install -y cmake build-essential ninja-build libgomp1 git
823
+ apt install -y cmake build-essential ninja-build libgomp1 git libcurl4-openssl-dev
991
824
 
992
825
  - name: ccache
993
826
  uses: hendrikmuhs/ccache-action@v1.2.16
@@ -1012,139 +845,52 @@ jobs:
1012
845
  strategy:
1013
846
  matrix:
1014
847
  cuda: ['12.4', '11.7']
1015
- build: ['cuda']
1016
848
 
1017
849
  steps:
1018
850
  - name: Clone
1019
851
  id: checkout
1020
852
  uses: actions/checkout@v4
1021
- with:
1022
- fetch-depth: 0
1023
853
 
1024
854
  - name: Install ccache
1025
855
  uses: hendrikmuhs/ccache-action@v1.2.16
1026
856
  with:
1027
- key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
1028
- variant: sccache
857
+ key: windows-cuda-${{ matrix.cuda }}
858
+ variant: ccache
1029
859
  evict-old-files: 1d
1030
860
 
1031
- - name: Install Cuda Toolkit 11.7
1032
- if: ${{ matrix.cuda == '11.7' }}
1033
- run: |
1034
- mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7"
1035
- choco install unzip -y
1036
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-11.7.99-archive.zip"
1037
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-11.7.99-archive.zip"
1038
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-11.7.99-archive.zip"
1039
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-11.7.4.6-archive.zip"
1040
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-11.7.91-archive.zip"
1041
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-11.7.91-archive.zip"
1042
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/windows-x86_64/cuda_nvprof-windows-x86_64-11.7.101-archive.zip"
1043
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-11.7.91-archive.zip"
1044
- unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7"
1045
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_cudart-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1046
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvcc-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1047
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvrtc-windows-x86_64-11.7.99-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1048
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libcublas-windows-x86_64-11.7.4.6-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1049
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvtx-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1050
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\visual_studio_integration-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1051
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_nvprof-windows-x86_64-11.7.101-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1052
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\cuda_cccl-windows-x86_64-11.7.91-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" /E /I /H /Y
1053
- echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1054
- echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\libnvvp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1055
- echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
1056
- echo "CUDA_PATH_V11_7=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
1057
-
1058
- - name: Install Cuda Toolkit 12.4
1059
- if: ${{ matrix.cuda == '12.4' }}
1060
- run: |
1061
- mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4"
1062
- choco install unzip -y
1063
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-12.4.127-archive.zip"
1064
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-12.4.131-archive.zip"
1065
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-12.4.127-archive.zip"
1066
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-12.4.5.8-archive.zip"
1067
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-12.4.127-archive.zip"
1068
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_profiler_api/windows-x86_64/cuda_profiler_api-windows-x86_64-12.4.127-archive.zip"
1069
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-12.4.127-archive.zip"
1070
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/windows-x86_64/cuda_nvprof-windows-x86_64-12.4.127-archive.zip"
1071
- curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-12.4.127-archive.zip"
1072
- unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4"
1073
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_cudart-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1074
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvcc-windows-x86_64-12.4.131-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1075
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvrtc-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1076
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\libcublas-windows-x86_64-12.4.5.8-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1077
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvtx-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1078
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_profiler_api-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1079
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\visual_studio_integration-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1080
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_nvprof-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1081
- xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\cuda_cccl-windows-x86_64-12.4.127-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" /E /I /H /Y
1082
- echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1083
- echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\libnvvp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
1084
- echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
1085
- echo "CUDA_PATH_V12_4=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
861
+ - name: Install Cuda Toolkit
862
+ uses: ./.github/actions/windows-setup-cuda
863
+ with:
864
+ cuda_version: ${{ matrix.cuda }}
1086
865
 
1087
866
  - name: Install Ninja
1088
867
  id: install_ninja
1089
868
  run: |
1090
869
  choco install ninja
1091
870
 
871
+ - name: libCURL
872
+ id: get_libcurl
873
+ uses: ./.github/actions/windows-setup-curl
874
+
1092
875
  - name: Build
1093
876
  id: cmake_build
1094
877
  shell: cmd
878
+ env:
879
+ CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
1095
880
  run: |
1096
881
  call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
1097
882
  cmake -S . -B build -G "Ninja Multi-Config" ^
1098
883
  -DLLAMA_BUILD_SERVER=ON ^
1099
884
  -DGGML_NATIVE=OFF ^
885
+ -DGGML_BACKEND_DL=ON ^
886
+ -DGGML_CPU_ALL_VARIANTS=ON ^
1100
887
  -DGGML_CUDA=ON ^
1101
- -DGGML_RPC=ON
888
+ -DGGML_RPC=ON ^
889
+ -DCURL_LIBRARY="%CURL_PATH%/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="%CURL_PATH%/include"
1102
890
  set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
1103
891
  cmake --build build --config Release -j %NINJA_JOBS% -t ggml
1104
892
  cmake --build build --config Release
1105
893
 
1106
- - name: Determine tag name
1107
- id: tag
1108
- shell: bash
1109
- run: |
1110
- BUILD_NUMBER="$(git rev-list --count HEAD)"
1111
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1112
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1113
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1114
- else
1115
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1116
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1117
- fi
1118
-
1119
- - name: Pack artifacts
1120
- id: pack_artifacts
1121
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1122
- run: |
1123
- 7z a llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip .\build\bin\Release\*
1124
-
1125
- - name: Upload artifacts
1126
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1127
- uses: actions/upload-artifact@v4
1128
- with:
1129
- path: llama-${{ steps.tag.outputs.name }}-bin-win-${{ matrix.build }}-cu${{ matrix.cuda }}-x64.zip
1130
- name: llama-bin-win-cu${{ matrix.cuda }}-x64.zip
1131
-
1132
- - name: Copy and pack Cuda runtime
1133
- if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
1134
- run: |
1135
- echo "Cuda install location: ${{ env.CUDA_PATH }}"
1136
- $dst='.\build\bin\cudart\'
1137
- robocopy "${{env.CUDA_PATH}}\bin" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
1138
- robocopy "${{env.CUDA_PATH}}\lib" $dst cudart64_*.dll cublas64_*.dll cublasLt64_*.dll
1139
- 7z a cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip $dst\*
1140
-
1141
- - name: Upload Cuda runtime
1142
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1143
- uses: actions/upload-artifact@v4
1144
- with:
1145
- path: cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
1146
- name: cudart-llama-bin-win-cu${{ matrix.cuda }}-x64.zip
1147
-
1148
894
  windows-latest-cmake-sycl:
1149
895
  runs-on: windows-latest
1150
896
 
@@ -1160,70 +906,24 @@ jobs:
1160
906
  - name: Clone
1161
907
  id: checkout
1162
908
  uses: actions/checkout@v4
1163
- with:
1164
- fetch-depth: 0
1165
909
 
1166
910
  - name: ccache
1167
911
  uses: hendrikmuhs/ccache-action@v1.2.16
1168
912
  with:
1169
913
  key: windows-latest-cmake-sycl
1170
- variant: sccache
914
+ variant: ccache
1171
915
  evict-old-files: 1d
1172
916
 
1173
917
  - name: Install
1174
918
  run: |
1175
919
  scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
1176
920
 
921
+ # TODO: add libcurl support ; we will also need to modify win-build-sycl.bat to accept user-specified args
922
+
1177
923
  - name: Build
1178
924
  id: cmake_build
1179
925
  run: examples/sycl/win-build-sycl.bat
1180
926
 
1181
- - name: Determine tag name
1182
- id: tag
1183
- shell: bash
1184
- run: |
1185
- BUILD_NUMBER="$(git rev-list --count HEAD)"
1186
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1187
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1188
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1189
- else
1190
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1191
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1192
- fi
1193
-
1194
- - name: Build the release package
1195
- id: pack_artifacts
1196
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1197
- run: |
1198
- echo "cp oneAPI running time dll files in ${{ env.ONEAPI_ROOT }} to ./build/bin"
1199
-
1200
- cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_sycl_blas.5.dll" ./build/bin
1201
- cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_core.2.dll" ./build/bin
1202
- cp "${{ env.ONEAPI_ROOT }}/mkl/latest/bin/mkl_tbb_thread.2.dll" ./build/bin
1203
-
1204
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_level_zero.dll" ./build/bin
1205
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_adapter_opencl.dll" ./build/bin
1206
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_loader.dll" ./build/bin
1207
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/ur_win_proxy_loader.dll" ./build/bin
1208
-
1209
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/sycl8.dll" ./build/bin
1210
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/svml_dispmd.dll" ./build/bin
1211
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libmmd.dll" ./build/bin
1212
- cp "${{ env.ONEAPI_ROOT }}/compiler/latest/bin/libiomp5md.dll" ./build/bin
1213
-
1214
- cp "${{ env.ONEAPI_ROOT }}/dnnl/latest/bin/dnnl.dll" ./build/bin
1215
- cp "${{ env.ONEAPI_ROOT }}/tbb/latest/bin/tbb12.dll" ./build/bin
1216
-
1217
- echo "cp oneAPI running time dll files to ./build/bin done"
1218
- 7z a llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip ./build/bin/*
1219
-
1220
- - name: Upload the release package
1221
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1222
- uses: actions/upload-artifact@v4
1223
- with:
1224
- path: llama-${{ steps.tag.outputs.name }}-bin-win-sycl-x64.zip
1225
- name: llama-bin-win-sycl-x64.zip
1226
-
1227
927
  windows-latest-cmake-hip:
1228
928
  if: ${{ github.event.inputs.create_release != 'true' }}
1229
929
  runs-on: windows-latest
@@ -1259,64 +959,14 @@ jobs:
1259
959
  key: ${{ github.job }}
1260
960
  evict-old-files: 1d
1261
961
 
1262
- - name: Build
1263
- id: cmake_build
1264
- run: |
1265
- $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
1266
- $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
1267
- cmake -G "Unix Makefiles" -B build -S . `
1268
- -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
1269
- -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1270
- -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
1271
- -DCMAKE_BUILD_TYPE=Release `
1272
- -DGGML_HIP=ON `
1273
- -DGGML_HIP_ROCWMMA_FATTN=ON `
1274
- -DGGML_RPC=ON
1275
- cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
1276
-
1277
- windows-latest-cmake-hip-release:
1278
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1279
- runs-on: windows-latest
1280
-
1281
- strategy:
1282
- matrix:
1283
- gpu_target: [gfx1100, gfx1101, gfx1030]
1284
-
1285
- steps:
1286
- - name: Clone
1287
- id: checkout
1288
- uses: actions/checkout@v4
1289
- with:
1290
- fetch-depth: 0
1291
-
1292
- - name: Clone rocWMMA repository
1293
- id: clone_rocwmma
1294
- run: |
1295
- git clone https://github.com/rocm/rocwmma --branch rocm-6.2.4 --depth 1
1296
-
1297
- - name: ccache
1298
- uses: hendrikmuhs/ccache-action@v1.2.16
1299
- with:
1300
- key: windows-latest-cmake-hip-release
1301
- evict-old-files: 1d
1302
-
1303
- - name: Install
1304
- id: depends
1305
- run: |
1306
- $ErrorActionPreference = "Stop"
1307
- write-host "Downloading AMD HIP SDK Installer"
1308
- Invoke-WebRequest -Uri "https://download.amd.com/developer/eula/rocm-hub/AMD-Software-PRO-Edition-24.Q3-WinSvr2022-For-HIP.exe" -OutFile "${env:RUNNER_TEMP}\rocm-install.exe"
1309
- write-host "Installing AMD HIP SDK"
1310
- Start-Process "${env:RUNNER_TEMP}\rocm-install.exe" -ArgumentList '-install' -NoNewWindow -Wait
1311
- write-host "Completed AMD HIP SDK installation"
1312
-
1313
- - name: Verify ROCm
1314
- id: verify
1315
- run: |
1316
- & 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
962
+ - name: libCURL
963
+ id: get_libcurl
964
+ uses: ./.github/actions/windows-setup-curl
1317
965
 
1318
966
  - name: Build
1319
967
  id: cmake_build
968
+ env:
969
+ CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
1320
970
  run: |
1321
971
  $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
1322
972
  $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
@@ -1325,39 +975,11 @@ jobs:
1325
975
  -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
1326
976
  -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/rocwmma/library/include/" `
1327
977
  -DCMAKE_BUILD_TYPE=Release `
1328
- -DAMDGPU_TARGETS=${{ matrix.gpu_target }} `
1329
- -DGGML_HIP_ROCWMMA_FATTN=ON `
1330
978
  -DGGML_HIP=ON `
1331
- -DGGML_RPC=ON
979
+ -DGGML_HIP_ROCWMMA_FATTN=ON `
980
+ -DGGML_RPC=ON `
981
+ -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include"
1332
982
  cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
1333
- md "build\bin\rocblas\library\"
1334
- cp "${env:HIP_PATH}\bin\hipblas.dll" "build\bin\"
1335
- cp "${env:HIP_PATH}\bin\rocblas.dll" "build\bin\"
1336
- cp "${env:HIP_PATH}\bin\rocblas\library\*" "build\bin\rocblas\library\"
1337
-
1338
- - name: Determine tag name
1339
- id: tag
1340
- shell: bash
1341
- run: |
1342
- BUILD_NUMBER="$(git rev-list --count HEAD)"
1343
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1344
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1345
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1346
- else
1347
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1348
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1349
- fi
1350
-
1351
- - name: Pack artifacts
1352
- id: pack_artifacts
1353
- run: |
1354
- 7z a llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip .\build\bin\*
1355
-
1356
- - name: Upload artifacts
1357
- uses: actions/upload-artifact@v4
1358
- with:
1359
- path: llama-${{ steps.tag.outputs.name }}-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
1360
- name: llama-bin-win-hip-x64-${{ matrix.gpu_target }}.zip
1361
983
 
1362
984
  ios-xcode-build:
1363
985
  runs-on: macos-latest
@@ -1365,8 +987,6 @@ jobs:
1365
987
  steps:
1366
988
  - name: Checkout code
1367
989
  uses: actions/checkout@v4
1368
- with:
1369
- fetch-depth: 0
1370
990
 
1371
991
  - name: Build
1372
992
  id: cmake_build
@@ -1375,7 +995,9 @@ jobs:
1375
995
  cmake -B build -G Xcode \
1376
996
  -DGGML_METAL_USE_BF16=ON \
1377
997
  -DGGML_METAL_EMBED_LIBRARY=ON \
998
+ -DLLAMA_CURL=OFF \
1378
999
  -DLLAMA_BUILD_EXAMPLES=OFF \
1000
+ -DLLAMA_BUILD_TOOLS=OFF \
1379
1001
  -DLLAMA_BUILD_TESTS=OFF \
1380
1002
  -DLLAMA_BUILD_SERVER=OFF \
1381
1003
  -DCMAKE_SYSTEM_NAME=iOS \
@@ -1391,32 +1013,6 @@ jobs:
1391
1013
  - name: Build Xcode project
1392
1014
  run: xcodebuild -project examples/llama.swiftui/llama.swiftui.xcodeproj -scheme llama.swiftui -sdk iphoneos CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= -destination 'generic/platform=iOS' FRAMEWORK_FOLDER_PATH=./build-ios build
1393
1015
 
1394
- - name: Determine tag name
1395
- id: tag
1396
- shell: bash
1397
- run: |
1398
- BUILD_NUMBER="$(git rev-list --count HEAD)"
1399
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1400
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1401
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1402
- else
1403
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1404
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1405
- fi
1406
-
1407
- - name: Pack artifacts
1408
- id: pack_artifacts
1409
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1410
- run: |
1411
- zip --symlinks -r llama-${{ steps.tag.outputs.name }}-xcframework.zip build-apple/llama.xcframework
1412
-
1413
- - name: Upload artifacts
1414
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1415
- uses: actions/upload-artifact@v4
1416
- with:
1417
- path: llama-${{ steps.tag.outputs.name }}-xcframework.zip
1418
- name: llama-${{ steps.tag.outputs.name }}-xcframework
1419
-
1420
1016
  android-build:
1421
1017
  runs-on: ubuntu-latest
1422
1018
 
@@ -1444,297 +1040,23 @@ jobs:
1444
1040
  - name: Build
1445
1041
  run: |
1446
1042
  cd examples/llama.android
1447
-
1448
1043
  ./gradlew build --no-daemon
1449
1044
 
1450
- release:
1451
- if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
1452
-
1453
- runs-on: ubuntu-latest
1454
-
1455
- needs:
1456
- - ubuntu-cpu-cmake
1457
- - ubuntu-22-cmake-vulkan
1458
- - windows-latest-cmake
1459
- - windows-2019-cmake-cuda
1460
- - windows-latest-cmake-sycl
1461
- - windows-latest-cmake-hip-release
1462
- - macOS-latest-cmake-arm64
1463
- - macOS-latest-cmake-x64
1464
-
1465
- steps:
1466
- - name: Clone
1467
- id: checkout
1468
- uses: actions/checkout@v4
1469
- with:
1470
- fetch-depth: 0
1471
-
1472
- - name: ccache
1473
- uses: hendrikmuhs/ccache-action@v1.2.16
1474
- with:
1475
- key: release
1476
- evict-old-files: 1d
1477
-
1478
- - name: Determine tag name
1479
- id: tag
1480
- shell: bash
1481
- run: |
1482
- BUILD_NUMBER="$(git rev-list --count HEAD)"
1483
- SHORT_HASH="$(git rev-parse --short=7 HEAD)"
1484
- if [[ "${{ env.BRANCH_NAME }}" == "master" ]]; then
1485
- echo "name=b${BUILD_NUMBER}" >> $GITHUB_OUTPUT
1486
- else
1487
- SAFE_NAME=$(echo "${{ env.BRANCH_NAME }}" | tr '/' '-')
1488
- echo "name=${SAFE_NAME}-b${BUILD_NUMBER}-${SHORT_HASH}" >> $GITHUB_OUTPUT
1489
- fi
1490
-
1491
- - name: Download artifacts
1492
- id: download-artifact
1493
- uses: actions/download-artifact@v4
1494
- with:
1495
- path: ./artifact
1496
-
1497
- - name: Move artifacts
1498
- id: move_artifacts
1499
- run: mkdir -p ./artifact/release && mv ./artifact/*/*.zip ./artifact/release
1500
-
1501
- - name: Create release
1502
- id: create_release
1503
- uses: ggml-org/action-create-release@v1
1504
- env:
1505
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1506
- with:
1507
- tag_name: ${{ steps.tag.outputs.name }}
1508
-
1509
- - name: Upload release
1510
- id: upload_release
1511
- uses: actions/github-script@v3
1512
- with:
1513
- github-token: ${{secrets.GITHUB_TOKEN}}
1514
- script: |
1515
- const path = require('path');
1516
- const fs = require('fs');
1517
- const release_id = '${{ steps.create_release.outputs.id }}';
1518
- for (let file of await fs.readdirSync('./artifact/release')) {
1519
- if (path.extname(file) === '.zip') {
1520
- console.log('uploadReleaseAsset', file);
1521
- await github.repos.uploadReleaseAsset({
1522
- owner: context.repo.owner,
1523
- repo: context.repo.repo,
1524
- release_id: release_id,
1525
- name: file,
1526
- data: await fs.readFileSync(`./artifact/release/${file}`)
1527
- });
1528
- }
1529
- }
1530
-
1531
- # ubuntu-latest-gcc:
1532
- # runs-on: ubuntu-latest
1533
- #
1534
- # strategy:
1535
- # matrix:
1536
- # build: [Debug, Release]
1537
- #
1538
- # steps:
1539
- # - name: Clone
1540
- # uses: actions/checkout@v4
1541
- #
1542
- # - name: Dependencies
1543
- # run: |
1544
- # sudo apt-get update
1545
- # sudo apt-get install build-essential
1546
- # sudo apt-get install cmake
1547
- #
1548
- # - name: Configure
1549
- # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
1550
- #
1551
- # - name: Build
1552
- # run: |
1553
- # make
1554
- #
1555
- # ubuntu-latest-clang:
1556
- # runs-on: ubuntu-latest
1557
- #
1558
- # strategy:
1559
- # matrix:
1560
- # build: [Debug, Release]
1561
- #
1562
- # steps:
1563
- # - name: Clone
1564
- # uses: actions/checkout@v4
1565
- #
1566
- # - name: Dependencies
1567
- # run: |
1568
- # sudo apt-get update
1569
- # sudo apt-get install build-essential
1570
- # sudo apt-get install cmake
1571
- #
1572
- # - name: Configure
1573
- # run: cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }} -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang
1574
- #
1575
- # - name: Build
1576
- # run: |
1577
- # make
1578
- #
1579
- # ubuntu-latest-gcc-sanitized:
1580
- # runs-on: ubuntu-latest
1581
- #
1582
- # strategy:
1583
- # matrix:
1584
- # sanitizer: [ADDRESS, THREAD, UNDEFINED]
1585
- #
1586
- # steps:
1587
- # - name: Clone
1588
- # uses: actions/checkout@v4
1589
- #
1590
- # - name: Dependencies
1591
- # run: |
1592
- # sudo apt-get update
1593
- # sudo apt-get install build-essential
1594
- # sudo apt-get install cmake
1595
- #
1596
- # - name: Configure
1597
- # run: cmake . -DCMAKE_BUILD_TYPE=Debug -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON
1598
- #
1599
- # - name: Build
1600
- # run: |
1601
- # make
1602
- #
1603
- # windows:
1604
- # runs-on: windows-latest
1605
- #
1606
- # strategy:
1607
- # matrix:
1608
- # build: [Release]
1609
- # arch: [Win32, x64]
1610
- # include:
1611
- # - arch: Win32
1612
- # s2arc: x86
1613
- # - arch: x64
1614
- # s2arc: x64
1615
- #
1616
- # steps:
1617
- # - name: Clone
1618
- # uses: actions/checkout@v4
1619
- #
1620
- # - name: Add msbuild to PATH
1621
- # uses: microsoft/setup-msbuild@v1
1622
- #
1623
- # - name: Configure
1624
- # run: >
1625
- # cmake -S . -B ./build -A ${{ matrix.arch }}
1626
- # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
1627
- #
1628
- # - name: Build
1629
- # run: |
1630
- # cd ./build
1631
- # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
1632
- #
1633
- # - name: Upload binaries
1634
- # uses: actions/upload-artifact@v4
1635
- # with:
1636
- # name: llama-bin-${{ matrix.arch }}
1637
- # path: build/bin/${{ matrix.build }}
1638
- #
1639
- # windows-blas:
1640
- # runs-on: windows-latest
1641
- #
1642
- # strategy:
1643
- # matrix:
1644
- # build: [Release]
1645
- # arch: [Win32, x64]
1646
- # blas: [ON]
1647
- # include:
1648
- # - arch: Win32
1649
- # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x86.zip
1650
- # s2arc: x86
1651
- # - arch: x64
1652
- # obzip: https://github.com/xianyi/OpenBLAS/releases/download/v0.3.21/OpenBLAS-0.3.21-x64.zip
1653
- # s2arc: x64
1654
- #
1655
- # steps:
1656
- # - name: Clone
1657
- # uses: actions/checkout@v4
1658
- #
1659
- # - name: Add msbuild to PATH
1660
- # uses: microsoft/setup-msbuild@v1
1661
- #
1662
- # - name: Fetch OpenBLAS
1663
- # if: matrix.blas == 'ON'
1664
- # run: |
1665
- # C:/msys64/usr/bin/wget.exe -qO blas.zip ${{ matrix.obzip }}
1666
- # 7z x blas.zip -oblas -y
1667
- # copy blas/include/cblas.h .
1668
- # copy blas/include/openblas_config.h .
1669
- # echo "blasdir=$env:GITHUB_WORKSPACE/blas" >> $env:GITHUB_ENV
1670
- #
1671
- # - name: Configure
1672
- # run: >
1673
- # cmake -S . -B ./build -A ${{ matrix.arch }}
1674
- # -DCMAKE_BUILD_TYPE=${{ matrix.build }}
1675
- # -DLLAMA_SUPPORT_OPENBLAS=${{ matrix.blas }}
1676
- # -DCMAKE_LIBRARY_PATH="$env:blasdir/lib"
1677
- #
1678
- # - name: Build
1679
- # run: |
1680
- # cd ./build
1681
- # msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
1682
- #
1683
- # - name: Copy libopenblas.dll
1684
- # if: matrix.blas == 'ON'
1685
- # run: copy "$env:blasdir/bin/libopenblas.dll" build/bin/${{ matrix.build }}
1686
- #
1687
- # - name: Upload binaries
1688
- # if: matrix.blas == 'ON'
1689
- # uses: actions/upload-artifact@v4
1690
- # with:
1691
- # name: llama-blas-bin-${{ matrix.arch }}
1692
- # path: build/bin/${{ matrix.build }}
1693
- #
1694
- # emscripten:
1695
- # runs-on: ubuntu-latest
1696
- #
1697
- # strategy:
1698
- # matrix:
1699
- # build: [Release]
1700
- #
1701
- # steps:
1702
- # - name: Clone
1703
- # uses: actions/checkout@v4
1704
- #
1705
- # - name: Dependencies
1706
- # run: |
1707
- # wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
1708
- # tar -xvf master.tar.gz
1709
- # emsdk-master/emsdk update
1710
- # emsdk-master/emsdk install latest
1711
- # emsdk-master/emsdk activate latest
1712
- #
1713
- # - name: Configure
1714
- # run: echo "tmp"
1715
- #
1716
- # - name: Build
1717
- # run: |
1718
- # pushd emsdk-master
1719
- # source ./emsdk_env.sh
1720
- # popd
1721
- # emcmake cmake . -DCMAKE_BUILD_TYPE=${{ matrix.build }}
1722
- # make
1723
-
1724
1045
  openEuler-latest-cmake-cann:
1725
1046
  if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Ascend NPU') }}
1726
1047
  defaults:
1727
1048
  run:
1728
- shell: bash -el {0}
1729
- runs-on: ubuntu-24.04-arm
1049
+ shell: bash -el {0}
1730
1050
  strategy:
1731
1051
  matrix:
1052
+ arch: [x86, aarch64]
1732
1053
  cann:
1733
- - '8.0.rc3.beta1-910b-openeuler22.03-py3.10'
1054
+ - '8.1.RC1.alpha001-910b-openeuler22.03-py3.10'
1734
1055
  device:
1735
1056
  - 'ascend910b3'
1736
1057
  build:
1737
1058
  - 'Release'
1059
+ runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
1738
1060
  container: ascendai/cann:${{ matrix.cann }}
1739
1061
  steps:
1740
1062
  - name: Checkout
@@ -1743,7 +1065,7 @@ jobs:
1743
1065
  - name: Dependencies
1744
1066
  run: |
1745
1067
  yum update -y
1746
- yum install -y git gcc gcc-c++ make cmake
1068
+ yum install -y git gcc gcc-c++ make cmake libcurl-devel
1747
1069
 
1748
1070
  - name: Build
1749
1071
  run: |