build.yml 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728
  1. name: CI
  2. on:
  3. workflow_dispatch: # allows manual triggering
  4. push:
  5. branches:
  6. - master
  7. paths: [
  8. '.github/workflows/build.yml',
  9. '.github/workflows/build-linux-cross.yml',
  10. '.github/workflows/build-cmake-pkg.yml',
  11. '**/CMakeLists.txt',
  12. '**/.cmake',
  13. '**/*.h',
  14. '**/*.hpp',
  15. '**/*.c',
  16. '**/*.cpp',
  17. '**/*.cu',
  18. '**/*.cuh',
  19. '**/*.swift',
  20. '**/*.m',
  21. '**/*.metal',
  22. '**/*.comp'
  23. ]
  24. pull_request:
  25. types: [opened, synchronize, reopened]
  26. paths: [
  27. '.github/workflows/build.yml',
  28. '.github/workflows/build-linux-cross.yml',
  29. '.github/workflows/build-cmake-pkg.yml',
  30. '**/CMakeLists.txt',
  31. '**/.cmake',
  32. '**/*.h',
  33. '**/*.hpp',
  34. '**/*.c',
  35. '**/*.cpp',
  36. '**/*.cu',
  37. '**/*.cuh',
  38. '**/*.swift',
  39. '**/*.m',
  40. '**/*.metal',
  41. '**/*.comp'
  42. ]
  43. concurrency:
  44. group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
  45. cancel-in-progress: true
  46. env:
  47. GGML_NLOOP: 3
  48. GGML_N_THREADS: 1
  49. LLAMA_LOG_COLORS: 1
  50. LLAMA_LOG_PREFIX: 1
  51. LLAMA_LOG_TIMESTAMPS: 1
  52. jobs:
  53. macOS-latest-cmake-arm64:
  54. runs-on: macos-latest
  55. steps:
  56. - name: Clone
  57. id: checkout
  58. uses: actions/checkout@v4
  59. - name: ccache
  60. uses: ggml-org/ccache-action@v1.2.16
  61. with:
  62. key: macOS-latest-cmake-arm64
  63. evict-old-files: 1d
  64. - name: Dependencies
  65. id: depends
  66. continue-on-error: true
  67. run: |
  68. brew update
  69. brew install curl
  70. - name: Build
  71. id: cmake_build
  72. run: |
  73. sysctl -a
  74. cmake -B build \
  75. -DCMAKE_BUILD_RPATH="@loader_path" \
  76. -DLLAMA_FATAL_WARNINGS=ON \
  77. -DGGML_METAL_USE_BF16=ON \
  78. -DGGML_METAL_EMBED_LIBRARY=OFF \
  79. -DGGML_METAL_SHADER_DEBUG=ON \
  80. -DGGML_RPC=ON
  81. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
  82. leaks -atExit -- ./build/bin/test-thread-safety -hf ggml-org/gemma-3-270m-qat-GGUF -ngl 99 -p "$(printf 'hello %.0s' {1..128})" -n 16 -c 512 -ub 32 -np 2 -t 2 -lv 1
  83. - name: Test
  84. id: cmake_test
  85. run: |
  86. cd build
  87. ctest -L 'main|curl' --verbose --timeout 900
  88. macOS-latest-cmake-x64:
  89. runs-on: macos-15-intel
  90. steps:
  91. - name: Clone
  92. id: checkout
  93. uses: actions/checkout@v4
  94. - name: ccache
  95. uses: ggml-org/ccache-action@v1.2.16
  96. with:
  97. key: macOS-latest-cmake-x64
  98. evict-old-files: 1d
  99. - name: Dependencies
  100. id: depends
  101. continue-on-error: true
  102. run: |
  103. brew update
  104. brew install curl
  105. - name: Build
  106. id: cmake_build
  107. run: |
  108. sysctl -a
  109. # Metal is disabled due to intermittent failures with Github runners not having a GPU:
  110. # https://github.com/ggml-org/llama.cpp/actions/runs/8635935781/job/23674807267#step:5:2313
  111. cmake -B build \
  112. -DCMAKE_BUILD_RPATH="@loader_path" \
  113. -DLLAMA_FATAL_WARNINGS=ON \
  114. -DGGML_METAL=OFF \
  115. -DGGML_RPC=ON \
  116. -DCMAKE_OSX_DEPLOYMENT_TARGET=13.3
  117. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
  118. - name: Test
  119. id: cmake_test
  120. run: |
  121. cd build
  122. ctest -L main --verbose --timeout 900
  123. macOS-latest-cmake-arm64-webgpu:
  124. runs-on: macos-latest
  125. steps:
  126. - name: Clone
  127. id: checkout
  128. uses: actions/checkout@v4
  129. - name: ccache
  130. uses: ggml-org/ccache-action@v1.2.16
  131. with:
  132. key: macOS-latest-cmake-arm64-webgpu
  133. evict-old-files: 1d
  134. - name: Dependencies
  135. id: depends
  136. continue-on-error: true
  137. run: |
  138. brew update
  139. brew install curl
  140. - name: Dawn Dependency
  141. id: dawn-depends
  142. run: |
  143. DAWN_VERSION="v2.0.0"
  144. DAWN_OWNER="reeselevine"
  145. DAWN_REPO="dawn"
  146. DAWN_ASSET_NAME="Dawn-5e9a4865b1635796ccc77dd30057f2b4002a1355-macos-latest-Release.zip"
  147. echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
  148. curl -L -o artifact.zip \
  149. "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
  150. mkdir dawn
  151. unzip artifact.zip
  152. tar -xvf Dawn-5e9a4865b1635796ccc77dd30057f2b4002a1355-macos-latest-Release.tar.gz -C dawn --strip-components=1
  153. - name: Build
  154. id: cmake_build
  155. run: |
  156. export CMAKE_PREFIX_PATH=dawn
  157. cmake -B build -DGGML_WEBGPU=ON -DGGML_METAL=OFF -DGGML_BLAS=OFF
  158. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
  159. - name: Test
  160. id: cmake_test
  161. run: |
  162. cd build
  163. ctest -L main --verbose --timeout 900
  164. ubuntu-cpu-cmake:
  165. strategy:
  166. matrix:
  167. include:
  168. - build: 'x64'
  169. os: ubuntu-22.04
  170. - build: 'arm64'
  171. os: ubuntu-22.04-arm
  172. - build: 's390x'
  173. os: ubuntu-24.04-s390x
  174. - build: 'ppc64le'
  175. os: ubuntu-24.04-ppc64le
  176. runs-on: ${{ matrix.os }}
  177. steps:
  178. - name: Clone
  179. id: checkout
  180. uses: actions/checkout@v4
  181. - name: ccache
  182. uses: ggml-org/ccache-action@v1.2.16
  183. with:
  184. key: ubuntu-cpu-cmake-${{ matrix.build }}
  185. evict-old-files: 1d
  186. - name: Build Dependencies
  187. id: build_depends
  188. run: |
  189. sudo apt-get update
  190. sudo apt-get install -y --no-install-recommends \
  191. python3 python3-pip python3-dev \
  192. libjpeg-dev build-essential libcurl4-openssl-dev \
  193. git-lfs
  194. - name: Python Dependencies
  195. id: python_depends
  196. run: |
  197. python3 -m pip install --upgrade pip
  198. pip3 install ./gguf-py
  199. - name: Swap Endianness
  200. id: endianness
  201. if: ${{ matrix.build == 's390x' }}
  202. run: |
  203. for f in models/*.gguf; do
  204. echo YES | python3 gguf-py/gguf/scripts/gguf_convert_endian.py $f big
  205. done
  206. - name: Build
  207. id: cmake_build
  208. run: |
  209. cmake -B build \
  210. -DLLAMA_FATAL_WARNINGS=ON \
  211. -DGGML_RPC=ON
  212. cmake --build build --config Release -j $(nproc)
  213. - name: Test
  214. id: cmake_test
  215. run: |
  216. cd build
  217. ctest -L 'main|curl' --verbose --timeout 900
  218. - name: Test llama2c conversion
  219. id: llama2c_test
  220. if: ${{ matrix.build != 's390x' }}
  221. run: |
  222. cd build
  223. echo "Fetch tokenizer"
  224. wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/tok512.bin
  225. echo "Fetch llama2c model"
  226. wget https://huggingface.co/karpathy/tinyllamas/resolve/main/stories260K/stories260K.bin
  227. ./bin/llama-convert-llama2c-to-ggml --copy-vocab-from-model ./tok512.bin --llama2c-model stories260K.bin --llama2c-output-model stories260K.gguf
  228. ./bin/llama-cli -m stories260K.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
  229. - name: Test llama2c (s390x)
  230. id: llama2c_test_s390x
  231. if: ${{ matrix.build == 's390x' }}
  232. run: |
  233. cd build
  234. echo "Fetch llama2c big-endian model"
  235. wget https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K-be.gguf
  236. ./bin/llama-cli -m stories260K-be.gguf -p "One day, Lily met a Shoggoth" -n 500 -c 256
  237. ubuntu-latest-cmake-sanitizer:
  238. runs-on: ubuntu-latest
  239. continue-on-error: true
  240. strategy:
  241. matrix:
  242. sanitizer: [ADDRESS, THREAD, UNDEFINED]
  243. build_type: [Debug]
  244. steps:
  245. - name: Clone
  246. id: checkout
  247. uses: actions/checkout@v4
  248. - name: ccache
  249. uses: ggml-org/ccache-action@v1.2.16
  250. with:
  251. key: ubuntu-latest-cmake-sanitizer-${{ matrix.sanitizer }}
  252. evict-old-files: 1d
  253. - name: Dependencies
  254. id: depends
  255. run: |
  256. sudo apt-get update
  257. sudo apt-get install build-essential libcurl4-openssl-dev
  258. - name: Build
  259. id: cmake_build
  260. if: ${{ matrix.sanitizer != 'THREAD' }}
  261. run: |
  262. cmake -B build \
  263. -DLLAMA_FATAL_WARNINGS=ON \
  264. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \
  265. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
  266. cmake --build build --config ${{ matrix.build_type }} -j $(nproc)
  267. - name: Build (no OpenMP)
  268. id: cmake_build_no_openmp
  269. if: ${{ matrix.sanitizer == 'THREAD' }}
  270. run: |
  271. cmake -B build \
  272. -DLLAMA_FATAL_WARNINGS=ON \
  273. -DLLAMA_SANITIZE_${{ matrix.sanitizer }}=ON \
  274. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
  275. -DGGML_OPENMP=OFF
  276. cmake --build build --config ${{ matrix.build_type }} -j $(nproc)
  277. - name: Test
  278. id: cmake_test
  279. run: |
  280. cd build
  281. ctest -L main --verbose --timeout 900
  282. ubuntu-latest-llguidance:
  283. runs-on: ubuntu-latest
  284. steps:
  285. - name: Clone
  286. id: checkout
  287. uses: actions/checkout@v4
  288. - name: Dependencies
  289. id: depends
  290. run: |
  291. sudo apt-get update
  292. sudo apt-get install build-essential libcurl4-openssl-dev
  293. - name: Build
  294. id: cmake_build
  295. run: |
  296. mkdir build
  297. cd build
  298. cmake .. \
  299. -DLLAMA_FATAL_WARNINGS=ON \
  300. -DLLAMA_LLGUIDANCE=ON
  301. cmake --build . --config Release -j $(nproc)
  302. - name: Test
  303. id: cmake_test
  304. run: |
  305. cd build
  306. ctest -L main --verbose --timeout 900
  307. ubuntu-latest-cmake-rpc:
  308. runs-on: ubuntu-latest
  309. continue-on-error: true
  310. steps:
  311. - name: Clone
  312. id: checkout
  313. uses: actions/checkout@v4
  314. # - name: ccache
  315. # uses: ggml-org/ccache-action@v1.2.16
  316. # with:
  317. # key: ubuntu-latest-cmake-rpc
  318. # evict-old-files: 1d
  319. - name: Dependencies
  320. id: depends
  321. run: |
  322. sudo apt-get update
  323. sudo apt-get install build-essential libcurl4-openssl-dev
  324. - name: Build
  325. id: cmake_build
  326. run: |
  327. cmake -B build \
  328. -DGGML_RPC=ON
  329. cmake --build build --config Release -j $(nproc)
  330. - name: Test
  331. id: cmake_test
  332. run: |
  333. cd build
  334. ctest -L main --verbose
  335. ubuntu-24-cmake-vulkan-deb:
  336. runs-on: ubuntu-24.04
  337. steps:
  338. - name: Clone
  339. id: checkout
  340. uses: actions/checkout@v4
  341. - name: ccache
  342. uses: ggml-org/ccache-action@v1.2.16
  343. with:
  344. key: ubuntu-24-cmake-vulkan-deb
  345. evict-old-files: 1d
  346. - name: Dependencies
  347. id: depends
  348. run: |
  349. sudo apt-get install -y glslc libvulkan-dev libcurl4-openssl-dev
  350. - name: Configure
  351. id: cmake_configure
  352. run: |
  353. cmake -B build \
  354. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  355. -DGGML_BACKEND_DL=ON \
  356. -DGGML_CPU_ALL_VARIANTS=ON \
  357. -DGGML_VULKAN=ON
  358. - name: Build
  359. id: cmake_build
  360. run: |
  361. cmake --build build -j $(nproc)
  362. ubuntu-24-cmake-vulkan:
  363. runs-on: ubuntu-24.04
  364. steps:
  365. - name: Clone
  366. id: checkout
  367. uses: actions/checkout@v4
  368. - name: ccache
  369. uses: ggml-org/ccache-action@v1.2.16
  370. with:
  371. key: ubuntu-24-cmake-vulkan
  372. evict-old-files: 1d
  373. - name: Dependencies
  374. id: depends
  375. run: |
  376. sudo add-apt-repository -y ppa:kisak/kisak-mesa
  377. sudo apt-get update -y
  378. sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libcurl4-openssl-dev
  379. - name: Get latest Vulkan SDK version
  380. id: vulkan_sdk_version
  381. run: |
  382. echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
  383. - name: Use Vulkan SDK Cache
  384. uses: actions/cache@v4
  385. id: cache-sdk
  386. with:
  387. path: ./vulkan_sdk
  388. key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
  389. - name: Setup Vulkan SDK
  390. if: steps.cache-sdk.outputs.cache-hit != 'true'
  391. uses: ./.github/actions/linux-setup-vulkan
  392. with:
  393. path: ./vulkan_sdk
  394. version: ${{ env.VULKAN_SDK_VERSION }}
  395. - name: Build
  396. id: cmake_build
  397. run: |
  398. source ./vulkan_sdk/setup-env.sh
  399. cmake -B build \
  400. -DGGML_VULKAN=ON
  401. cmake --build build --config Release -j $(nproc)
  402. - name: Test
  403. id: cmake_test
  404. run: |
  405. cd build
  406. export GGML_VK_VISIBLE_DEVICES=0
  407. export GGML_VK_DISABLE_F16=1
  408. # This is using llvmpipe and runs slower than other backends
  409. ctest -L main --verbose --timeout 4200
  410. ubuntu-24-cmake-webgpu:
  411. runs-on: ubuntu-24.04
  412. steps:
  413. - name: Clone
  414. id: checkout
  415. uses: actions/checkout@v4
  416. - name: ccache
  417. uses: ggml-org/ccache-action@v1.2.16
  418. with:
  419. key: ubuntu-24-cmake-webgpu
  420. evict-old-files: 1d
  421. - name: Dependencies
  422. id: depends
  423. run: |
  424. sudo add-apt-repository -y ppa:kisak/kisak-mesa
  425. sudo apt-get update -y
  426. sudo apt-get install -y build-essential mesa-vulkan-drivers libxcb-xinput0 libxcb-xinerama0 libxcb-cursor-dev libcurl4-openssl-dev
  427. - name: Get latest Vulkan SDK version
  428. id: vulkan_sdk_version
  429. run: |
  430. echo "VULKAN_SDK_VERSION=$(curl https://vulkan.lunarg.com/sdk/latest/linux.txt)" >> "$GITHUB_ENV"
  431. - name: Use Vulkan SDK Cache
  432. uses: actions/cache@v4
  433. id: cache-sdk
  434. with:
  435. path: ./vulkan_sdk
  436. key: vulkan-sdk-${{ env.VULKAN_SDK_VERSION }}-${{ runner.os }}
  437. - name: Setup Vulkan SDK
  438. if: steps.cache-sdk.outputs.cache-hit != 'true'
  439. uses: ./.github/actions/linux-setup-vulkan
  440. with:
  441. path: ./vulkan_sdk
  442. version: ${{ env.VULKAN_SDK_VERSION }}
  443. - name: Dawn Dependency
  444. id: dawn-depends
  445. run: |
  446. sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev libxi-dev
  447. DAWN_VERSION="v2.0.0"
  448. DAWN_OWNER="reeselevine"
  449. DAWN_REPO="dawn"
  450. DAWN_ASSET_NAME="Dawn-5e9a4865b1635796ccc77dd30057f2b4002a1355-ubuntu-latest-Release.zip"
  451. echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
  452. curl -L -o artifact.zip \
  453. "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
  454. mkdir dawn
  455. unzip artifact.zip
  456. tar -xvf Dawn-5e9a4865b1635796ccc77dd30057f2b4002a1355-ubuntu-latest-Release.tar.gz -C dawn --strip-components=1
  457. - name: Build
  458. id: cmake_build
  459. run: |
  460. export Dawn_DIR=dawn/lib64/cmake/Dawn
  461. cmake -B build -DGGML_WEBGPU=ON
  462. cmake --build build --config Release -j $(nproc)
  463. - name: Test
  464. id: cmake_test
  465. run: |
  466. cd build
  467. # This is using llvmpipe and runs slower than other backends
  468. ctest -L main --verbose --timeout 3600
  469. ubuntu-22-cmake-hip:
  470. runs-on: ubuntu-22.04
  471. container: rocm/dev-ubuntu-22.04:6.1.2
  472. steps:
  473. - name: Clone
  474. id: checkout
  475. uses: actions/checkout@v4
  476. - name: Dependencies
  477. id: depends
  478. run: |
  479. sudo apt-get update
  480. sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev libcurl4-openssl-dev rocwmma-dev
  481. - name: ccache
  482. uses: ggml-org/ccache-action@v1.2.16
  483. with:
  484. key: ubuntu-22-cmake-hip
  485. evict-old-files: 1d
  486. - name: Build with native CMake HIP support
  487. id: cmake_build
  488. run: |
  489. cmake -B build -S . \
  490. -DCMAKE_HIP_COMPILER="$(hipconfig -l)/clang" \
  491. -DGGML_HIP_ROCWMMA_FATTN=ON \
  492. -DGGML_HIP=ON
  493. cmake --build build --config Release -j $(nproc)
  494. ubuntu-22-cmake-musa:
  495. runs-on: ubuntu-22.04
  496. container: mthreads/musa:rc4.3.0-devel-ubuntu22.04-amd64
  497. steps:
  498. - name: Clone
  499. id: checkout
  500. uses: actions/checkout@v4
  501. - name: Dependencies
  502. id: depends
  503. run: |
  504. apt-get update
  505. apt-get install -y build-essential git cmake libcurl4-openssl-dev
  506. - name: ccache
  507. uses: ggml-org/ccache-action@v1.2.16
  508. with:
  509. key: ubuntu-22-cmake-musa
  510. evict-old-files: 1d
  511. - name: Build with native CMake MUSA support
  512. id: cmake_build
  513. run: |
  514. cmake -B build -S . \
  515. -DGGML_MUSA=ON
  516. cmake --build build --config Release -j $(nproc)
  517. ubuntu-22-cmake-sycl:
  518. runs-on: ubuntu-22.04
  519. continue-on-error: true
  520. steps:
  521. - uses: actions/checkout@v4
  522. - name: add oneAPI to apt
  523. shell: bash
  524. run: |
  525. cd /tmp
  526. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  527. sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  528. rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  529. sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
  530. - name: install oneAPI dpcpp compiler
  531. shell: bash
  532. run: |
  533. sudo apt update
  534. sudo apt install intel-oneapi-compiler-dpcpp-cpp libcurl4-openssl-dev
  535. - name: install oneAPI MKL library
  536. shell: bash
  537. run: |
  538. sudo apt install intel-oneapi-mkl-devel
  539. - name: Clone
  540. id: checkout
  541. uses: actions/checkout@v4
  542. - name: ccache
  543. uses: ggml-org/ccache-action@v1.2.16
  544. with:
  545. key: ubuntu-22-cmake-sycl
  546. evict-old-files: 1d
  547. - name: Build
  548. id: cmake_build
  549. run: |
  550. source /opt/intel/oneapi/setvars.sh
  551. cmake -B build \
  552. -DGGML_SYCL=ON \
  553. -DCMAKE_C_COMPILER=icx \
  554. -DCMAKE_CXX_COMPILER=icpx
  555. cmake --build build --config Release -j $(nproc)
  556. ubuntu-22-cmake-sycl-fp16:
  557. runs-on: ubuntu-22.04
  558. continue-on-error: true
  559. steps:
  560. - uses: actions/checkout@v4
  561. - name: add oneAPI to apt
  562. shell: bash
  563. run: |
  564. cd /tmp
  565. wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  566. sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  567. rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
  568. sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
  569. - name: install oneAPI dpcpp compiler
  570. shell: bash
  571. run: |
  572. sudo apt update
  573. sudo apt install intel-oneapi-compiler-dpcpp-cpp libcurl4-openssl-dev
  574. - name: install oneAPI MKL library
  575. shell: bash
  576. run: |
  577. sudo apt install intel-oneapi-mkl-devel
  578. - name: Clone
  579. id: checkout
  580. uses: actions/checkout@v4
  581. - name: ccache
  582. uses: ggml-org/ccache-action@v1.2.16
  583. with:
  584. key: ubuntu-22-cmake-sycl-fp16
  585. evict-old-files: 1d
  586. - name: Build
  587. id: cmake_build
  588. run: |
  589. source /opt/intel/oneapi/setvars.sh
  590. cmake -B build \
  591. -DGGML_SYCL=ON \
  592. -DCMAKE_C_COMPILER=icx \
  593. -DCMAKE_CXX_COMPILER=icpx \
  594. -DGGML_SYCL_F16=ON
  595. cmake --build build --config Release -j $(nproc)
  596. build-linux-cross:
  597. uses: ./.github/workflows/build-linux-cross.yml
  598. build-cmake-pkg:
  599. uses: ./.github/workflows/build-cmake-pkg.yml
  600. macOS-latest-cmake-ios:
  601. runs-on: macos-latest
  602. steps:
  603. - name: Clone
  604. id: checkout
  605. uses: actions/checkout@v4
  606. - name: ccache
  607. uses: ggml-org/ccache-action@v1.2.16
  608. with:
  609. key: macOS-latest-cmake-ios
  610. evict-old-files: 1d
  611. - name: Dependencies
  612. id: depends
  613. continue-on-error: true
  614. run: |
  615. brew update
  616. - name: Build
  617. id: cmake_build
  618. run: |
  619. sysctl -a
  620. cmake -B build -G Xcode \
  621. -DGGML_METAL_USE_BF16=ON \
  622. -DGGML_METAL_EMBED_LIBRARY=ON \
  623. -DLLAMA_BUILD_COMMON=OFF \
  624. -DLLAMA_BUILD_EXAMPLES=OFF \
  625. -DLLAMA_BUILD_TOOLS=OFF \
  626. -DLLAMA_BUILD_TESTS=OFF \
  627. -DLLAMA_BUILD_SERVER=OFF \
  628. -DCMAKE_SYSTEM_NAME=iOS \
  629. -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
  630. -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
  631. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
  632. macOS-latest-cmake-tvos:
  633. runs-on: macos-latest
  634. steps:
  635. - name: Clone
  636. id: checkout
  637. uses: actions/checkout@v4
  638. - name: ccache
  639. uses: ggml-org/ccache-action@v1.2.16
  640. with:
  641. key: macOS-latest-cmake-tvos
  642. evict-old-files: 1d
  643. - name: Dependencies
  644. id: depends
  645. continue-on-error: true
  646. run: |
  647. brew update
  648. - name: Build
  649. id: cmake_build
  650. run: |
  651. sysctl -a
  652. cmake -B build -G Xcode \
  653. -DGGML_METAL_USE_BF16=ON \
  654. -DGGML_METAL_EMBED_LIBRARY=ON \
  655. -DLLAMA_BUILD_COMMON=OFF \
  656. -DLLAMA_BUILD_EXAMPLES=OFF \
  657. -DLLAMA_BUILD_TOOLS=OFF \
  658. -DLLAMA_BUILD_TESTS=OFF \
  659. -DLLAMA_BUILD_SERVER=OFF \
  660. -DCMAKE_SYSTEM_NAME=tvOS \
  661. -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
  662. -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
  663. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
  664. macOS-latest-cmake-visionos:
  665. runs-on: macos-latest
  666. steps:
  667. - name: Clone
  668. id: checkout
  669. uses: actions/checkout@v4
  670. - name: Dependencies
  671. id: depends
  672. continue-on-error: true
  673. run: |
  674. brew update
  675. - name: Build
  676. id: cmake_build
  677. run: |
  678. sysctl -a
  679. cmake -B build -G Xcode \
  680. -DGGML_METAL_USE_BF16=ON \
  681. -DGGML_METAL_EMBED_LIBRARY=ON \
  682. -DLLAMA_BUILD_COMMON=OFF \
  683. -DLLAMA_BUILD_EXAMPLES=OFF \
  684. -DLLAMA_BUILD_TOOLS=OFF \
  685. -DLLAMA_BUILD_TESTS=OFF \
  686. -DLLAMA_BUILD_SERVER=OFF \
  687. -DCMAKE_SYSTEM_NAME=visionOS \
  688. -DCMAKE_OSX_DEPLOYMENT_TARGET=1.0 \
  689. -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
  690. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
  691. macOS-latest-swift:
  692. runs-on: macos-latest
  693. needs: ios-xcode-build
  694. strategy:
  695. matrix:
  696. destination: ['generic/platform=macOS', 'generic/platform=iOS', 'generic/platform=tvOS']
  697. steps:
  698. - name: Clone
  699. id: checkout
  700. uses: actions/checkout@v4
  701. - name: ccache
  702. uses: ggml-org/ccache-action@v1.2.16
  703. with:
  704. key: macOS-latest-swift
  705. evict-old-files: 1d
  706. - name: Download xcframework artifact
  707. uses: actions/download-artifact@v4
  708. with:
  709. name: llama-xcframework
  710. path: build-apple/llama.xcframework/
  711. - name: Dependencies
  712. id: depends
  713. continue-on-error: true
  714. run: |
  715. brew update
  716. - name: Build llama.cpp with CMake
  717. id: cmake_build
  718. run: |
  719. sysctl -a
  720. cmake -B build -G Xcode \
  721. -DGGML_METAL_USE_BF16=ON \
  722. -DGGML_METAL_EMBED_LIBRARY=ON \
  723. -DLLAMA_CURL=OFF \
  724. -DLLAMA_BUILD_EXAMPLES=OFF \
  725. -DLLAMA_BUILD_TOOLS=OFF \
  726. -DLLAMA_BUILD_TESTS=OFF \
  727. -DLLAMA_BUILD_SERVER=OFF \
  728. -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
  729. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu)
  730. windows-msys2:
  731. runs-on: windows-2025
  732. strategy:
  733. fail-fast: false
  734. matrix:
  735. include:
  736. - { sys: UCRT64, env: ucrt-x86_64, build: Release }
  737. - { sys: CLANG64, env: clang-x86_64, build: Release }
  738. steps:
  739. - name: Clone
  740. uses: actions/checkout@v4
  741. - name: ccache
  742. uses: ggml-org/ccache-action@v1.2.16
  743. with:
  744. key: windows-msys2
  745. variant: ccache
  746. evict-old-files: 1d
  747. - name: Setup ${{ matrix.sys }}
  748. uses: msys2/setup-msys2@v2
  749. with:
  750. update: true
  751. msystem: ${{matrix.sys}}
  752. install: >-
  753. base-devel
  754. git
  755. mingw-w64-${{matrix.env}}-toolchain
  756. mingw-w64-${{matrix.env}}-cmake
  757. mingw-w64-${{matrix.env}}-openblas
  758. - name: Build using CMake
  759. shell: msys2 {0}
  760. run: |
  761. cmake -B build
  762. cmake --build build --config ${{ matrix.build }} -j $(nproc)
  763. - name: Clean after building using CMake
  764. shell: msys2 {0}
  765. run: |
  766. rm -rf build
  767. - name: Build using CMake w/ OpenBLAS
  768. shell: msys2 {0}
  769. run: |
  770. cmake -B build -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS
  771. cmake --build build --config ${{ matrix.build }} -j $(nproc)
  772. windows-latest-cmake:
  773. runs-on: windows-2025
  774. env:
  775. OPENBLAS_VERSION: 0.3.23
  776. SDE_VERSION: 9.33.0-2024-01-07
  777. VULKAN_VERSION: 1.4.313.2
  778. strategy:
  779. matrix:
  780. include:
  781. - build: 'cpu-x64 (static)'
  782. arch: 'x64'
  783. defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/x64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DBUILD_SHARED_LIBS=OFF'
  784. - build: 'openblas-x64'
  785. arch: 'x64'
  786. 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"'
  787. - build: 'vulkan-x64'
  788. arch: 'x64'
  789. defines: '-DCMAKE_BUILD_TYPE=Release -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DGGML_RPC=ON -DGGML_BACKEND_DL=ON -DGGML_CPU_ALL_VARIANTS=ON -DGGML_VULKAN=ON'
  790. - build: 'llvm-arm64'
  791. arch: 'arm64'
  792. defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
  793. - build: 'llvm-arm64-opencl-adreno'
  794. arch: 'arm64'
  795. 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'
  796. steps:
  797. - name: Clone
  798. id: checkout
  799. uses: actions/checkout@v4
  800. - name: ccache
  801. uses: ggml-org/ccache-action@v1.2.16
  802. with:
  803. key: windows-latest-cmake-${{ matrix.build }}
  804. variant: ccache
  805. evict-old-files: 1d
  806. - name: Download OpenBLAS
  807. id: get_openblas
  808. if: ${{ matrix.build == 'openblas-x64' }}
  809. run: |
  810. curl.exe -o $env:RUNNER_TEMP/openblas.zip -L "https://github.com/xianyi/OpenBLAS/releases/download/v${env:OPENBLAS_VERSION}/OpenBLAS-${env:OPENBLAS_VERSION}-x64.zip"
  811. curl.exe -o $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt -L "https://github.com/xianyi/OpenBLAS/raw/v${env:OPENBLAS_VERSION}/LICENSE"
  812. mkdir $env:RUNNER_TEMP/openblas
  813. tar.exe -xvf $env:RUNNER_TEMP/openblas.zip -C $env:RUNNER_TEMP/openblas
  814. $vcdir = $(vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
  815. $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim()))
  816. $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe')
  817. & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll
  818. - name: Install Vulkan SDK
  819. id: get_vulkan
  820. if: ${{ matrix.build == 'vulkan-x64' }}
  821. run: |
  822. curl.exe -o $env:RUNNER_TEMP/VulkanSDK-Installer.exe -L "https://sdk.lunarg.com/sdk/download/${env:VULKAN_VERSION}/windows/vulkansdk-windows-X64-${env:VULKAN_VERSION}.exe"
  823. & "$env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
  824. Add-Content $env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\${env:VULKAN_VERSION}"
  825. Add-Content $env:GITHUB_PATH "C:\VulkanSDK\${env:VULKAN_VERSION}\bin"
  826. - name: Install Ninja
  827. id: install_ninja
  828. run: |
  829. choco install ninja
  830. - name: Install OpenCL Headers and Libs
  831. id: install_opencl
  832. if: ${{ matrix.build == 'llvm-arm64-opencl-adreno' }}
  833. run: |
  834. git clone https://github.com/KhronosGroup/OpenCL-Headers
  835. cd OpenCL-Headers
  836. cmake -B build `
  837. -DBUILD_TESTING=OFF `
  838. -DOPENCL_HEADERS_BUILD_TESTING=OFF `
  839. -DOPENCL_HEADERS_BUILD_CXX_TESTS=OFF `
  840. -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"
  841. cmake --build build --target install
  842. git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader
  843. cd OpenCL-ICD-Loader
  844. cmake -B build-arm64-release `
  845. -A arm64 `
  846. -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" `
  847. -DCMAKE_INSTALL_PREFIX="$env:RUNNER_TEMP/opencl-arm64-release"
  848. cmake --build build-arm64-release --target install --config release
  849. - name: libCURL
  850. id: get_libcurl
  851. uses: ./.github/actions/windows-setup-curl
  852. with:
  853. architecture: ${{ matrix.arch == 'x64' && 'win64' || 'win64a' }}
  854. - name: Build
  855. id: cmake_build
  856. env:
  857. CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
  858. run: |
  859. cmake -S . -B build ${{ matrix.defines }} `
  860. -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include"
  861. cmake --build build --config Release -j ${env:NUMBER_OF_PROCESSORS}
  862. cp $env:CURL_PATH/bin/libcurl-*.dll build/bin/Release
  863. - name: Add libopenblas.dll
  864. id: add_libopenblas_dll
  865. if: ${{ matrix.build == 'openblas-x64' }}
  866. run: |
  867. cp $env:RUNNER_TEMP/openblas/bin/libopenblas.dll ./build/bin/Release/openblas.dll
  868. cp $env:RUNNER_TEMP/OpenBLAS.LICENSE.txt ./build/bin/Release/OpenBLAS-${env:OPENBLAS_VERSION}.txt
  869. - name: Test
  870. id: cmake_test
  871. if: ${{ matrix.arch == 'x64' }}
  872. run: |
  873. cd build
  874. ctest -L main -C Release --verbose --timeout 900
  875. # TODO: disabled for now, consider adding tests for all CPU variants instead
  876. # - name: Test (Intel SDE)
  877. # id: cmake_test_sde
  878. # if: ${{ matrix.build == 'avx512-x64' && env.HAS_AVX512F == '0' }} # use Intel SDE for AVX-512 emulation
  879. # run: |
  880. # curl.exe -o $env:RUNNER_TEMP/sde.tar.xz -L "https://downloadmirror.intel.com/813591/sde-external-${env:SDE_VERSION}-win.tar.xz"
  881. # # for some weird reason windows tar doesn't like sde tar.xz
  882. # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar.xz
  883. # 7z x "-o${env:RUNNER_TEMP}" $env:RUNNER_TEMP/sde.tar
  884. # $sde = $(join-path $env:RUNNER_TEMP sde-external-${env:SDE_VERSION}-win/sde.exe)
  885. # cd build
  886. # $env:LLAMA_SKIP_TESTS_SLOW_ON_EMULATOR = 1
  887. # & $sde -future -- ctest -L main -C Release --verbose --timeout 900
  888. ubuntu-latest-cmake-cuda:
  889. runs-on: ubuntu-latest
  890. container: nvidia/cuda:12.6.2-devel-ubuntu24.04
  891. steps:
  892. - name: Clone
  893. id: checkout
  894. uses: actions/checkout@v4
  895. - name: Install dependencies
  896. env:
  897. DEBIAN_FRONTEND: noninteractive
  898. run: |
  899. apt update
  900. apt install -y cmake build-essential ninja-build libgomp1 git libcurl4-openssl-dev
  901. - name: ccache
  902. uses: ggml-org/ccache-action@v1.2.16
  903. with:
  904. key: ubuntu-latest-cmake-cuda
  905. evict-old-files: 1d
  906. - name: Build with CMake
  907. run: |
  908. cmake -S . -B build -G Ninja \
  909. -DCMAKE_BUILD_TYPE=Release \
  910. -DCMAKE_CUDA_ARCHITECTURES=89-real \
  911. -DCMAKE_EXE_LINKER_FLAGS=-Wl,--allow-shlib-undefined \
  912. -DLLAMA_FATAL_WARNINGS=ON \
  913. -DGGML_NATIVE=OFF \
  914. -DGGML_CUDA=ON
  915. cmake --build build
  916. windows-2022-cmake-cuda:
  917. runs-on: windows-2022
  918. strategy:
  919. matrix:
  920. cuda: ['12.4']
  921. steps:
  922. - name: Clone
  923. id: checkout
  924. uses: actions/checkout@v4
  925. - name: Install ccache
  926. uses: ggml-org/ccache-action@v1.2.16
  927. with:
  928. key: windows-cuda-${{ matrix.cuda }}
  929. variant: ccache
  930. evict-old-files: 1d
  931. - name: Install Cuda Toolkit
  932. uses: ./.github/actions/windows-setup-cuda
  933. with:
  934. cuda_version: ${{ matrix.cuda }}
  935. - name: Install Ninja
  936. id: install_ninja
  937. run: |
  938. choco install ninja
  939. - name: libCURL
  940. id: get_libcurl
  941. uses: ./.github/actions/windows-setup-curl
  942. - name: Build
  943. id: cmake_build
  944. shell: cmd
  945. env:
  946. CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
  947. run: |
  948. call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
  949. cmake -S . -B build -G "Ninja Multi-Config" ^
  950. -DLLAMA_BUILD_SERVER=ON ^
  951. -DGGML_NATIVE=OFF ^
  952. -DGGML_BACKEND_DL=ON ^
  953. -DGGML_CPU_ALL_VARIANTS=ON ^
  954. -DGGML_CUDA=ON ^
  955. -DGGML_RPC=ON ^
  956. -DCURL_LIBRARY="%CURL_PATH%/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="%CURL_PATH%/include"
  957. set /A NINJA_JOBS=%NUMBER_OF_PROCESSORS%-1
  958. cmake --build build --config Release -j %NINJA_JOBS% -t ggml
  959. cmake --build build --config Release
  960. windows-latest-cmake-sycl:
  961. runs-on: windows-2022
  962. defaults:
  963. run:
  964. shell: bash
  965. env:
  966. WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/24751ead-ddc5-4479-b9e6-f9fe2ff8b9f2/intel-deep-learning-essentials-2025.2.1.25_offline.exe
  967. WINDOWS_DPCPP_MKL: intel.oneapi.win.cpp-dpcpp-common:intel.oneapi.win.mkl.devel:intel.oneapi.win.dnnl:intel.oneapi.win.tbb.devel
  968. ONEAPI_ROOT: "C:/Program Files (x86)/Intel/oneAPI"
  969. steps:
  970. - name: Clone
  971. id: checkout
  972. uses: actions/checkout@v4
  973. - name: ccache
  974. uses: ggml-org/ccache-action@v1.2.16
  975. with:
  976. key: windows-latest-cmake-sycl
  977. variant: ccache
  978. evict-old-files: 1d
  979. - name: Install
  980. run: |
  981. scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
  982. # TODO: add libcurl support ; we will also need to modify win-build-sycl.bat to accept user-specified args
  983. - name: Build
  984. id: cmake_build
  985. run: examples/sycl/win-build-sycl.bat
  986. windows-latest-cmake-hip:
  987. runs-on: windows-2022
  988. env:
  989. # The ROCm version must correspond to the version used in the HIP SDK.
  990. ROCM_VERSION: "6.4.2"
  991. # Make sure this is in sync with build-cache.yml
  992. HIPSDK_INSTALLER_VERSION: "25.Q3"
  993. steps:
  994. - name: Clone
  995. id: checkout
  996. uses: actions/checkout@v4
  997. - name: Grab rocWMMA package
  998. id: grab_rocwmma
  999. run: |
  1000. curl -o rocwmma.deb "https://repo.radeon.com/rocm/apt/${{ env.ROCM_VERSION }}/pool/main/r/rocwmma-dev/rocwmma-dev_1.7.0.60402-120~24.04_amd64.deb"
  1001. 7z x rocwmma.deb
  1002. 7z x data.tar
  1003. - name: Use ROCm Installation Cache
  1004. uses: actions/cache@v4
  1005. id: cache-rocm
  1006. with:
  1007. path: C:\Program Files\AMD\ROCm
  1008. key: rocm-${{ env.HIPSDK_INSTALLER_VERSION }}-${{ runner.os }}
  1009. - name: Setup ROCm
  1010. if: steps.cache-rocm.outputs.cache-hit != 'true'
  1011. uses: ./.github/actions/windows-setup-rocm
  1012. with:
  1013. version: ${{ env.HIPSDK_INSTALLER_VERSION }}
  1014. - name: Verify ROCm
  1015. id: verify
  1016. run: |
  1017. # Find and test ROCm installation
  1018. $clangPath = Get-ChildItem 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | Select-Object -First 1
  1019. if (-not $clangPath) {
  1020. Write-Error "ROCm installation not found"
  1021. exit 1
  1022. }
  1023. & $clangPath.FullName --version
  1024. - name: Install ccache
  1025. uses: ggml-org/ccache-action@v1.2.16
  1026. with:
  1027. key: ${{ github.job }}
  1028. evict-old-files: 1d
  1029. - name: libCURL
  1030. id: get_libcurl
  1031. uses: ./.github/actions/windows-setup-curl
  1032. - name: Build
  1033. id: cmake_build
  1034. env:
  1035. CURL_PATH: ${{ steps.get_libcurl.outputs.curl_path }}
  1036. run: |
  1037. $env:HIP_PATH=$(Resolve-Path 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' | split-path | split-path)
  1038. $env:CMAKE_PREFIX_PATH="${env:HIP_PATH}"
  1039. cmake -G "Unix Makefiles" -B build -S . `
  1040. -DCMAKE_C_COMPILER="${env:HIP_PATH}\bin\clang.exe" `
  1041. -DCMAKE_CXX_COMPILER="${env:HIP_PATH}\bin\clang++.exe" `
  1042. -DCMAKE_CXX_FLAGS="-I$($PWD.Path.Replace('\', '/'))/opt/rocm-${{ env.ROCM_VERSION }}/include/" `
  1043. -DCMAKE_BUILD_TYPE=Release `
  1044. -DROCM_DIR="${env:HIP_PATH}" `
  1045. -DGGML_HIP=ON `
  1046. -DGGML_HIP_ROCWMMA_FATTN=ON `
  1047. -DGGML_RPC=ON `
  1048. -DCURL_LIBRARY="$env:CURL_PATH/lib/libcurl.dll.a" -DCURL_INCLUDE_DIR="$env:CURL_PATH/include"
  1049. cmake --build build -j ${env:NUMBER_OF_PROCESSORS}
  1050. ios-xcode-build:
  1051. runs-on: macos-latest
  1052. steps:
  1053. - name: Checkout code
  1054. uses: actions/checkout@v4
  1055. - name: Setup Xcode
  1056. uses: maxim-lobanov/setup-xcode@v1
  1057. with:
  1058. xcode-version: latest-stable
  1059. - name: Build
  1060. id: cmake_build
  1061. run: |
  1062. sysctl -a
  1063. cmake -B build -G Xcode \
  1064. -DGGML_METAL_USE_BF16=ON \
  1065. -DGGML_METAL_EMBED_LIBRARY=ON \
  1066. -DLLAMA_CURL=OFF \
  1067. -DLLAMA_BUILD_EXAMPLES=OFF \
  1068. -DLLAMA_BUILD_TOOLS=OFF \
  1069. -DLLAMA_BUILD_TESTS=OFF \
  1070. -DLLAMA_BUILD_SERVER=OFF \
  1071. -DCMAKE_SYSTEM_NAME=iOS \
  1072. -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
  1073. -DCMAKE_XCODE_ATTRIBUTE_DEVELOPMENT_TEAM=ggml
  1074. cmake --build build --config Release -j $(sysctl -n hw.logicalcpu) -- CODE_SIGNING_ALLOWED=NO
  1075. - name: xcodebuild for swift package
  1076. id: xcodebuild
  1077. run: |
  1078. ./build-xcframework.sh
  1079. - name: Upload xcframework artifact
  1080. uses: actions/upload-artifact@v4
  1081. with:
  1082. name: llama-xcframework
  1083. path: build-apple/llama.xcframework/
  1084. retention-days: 1
  1085. - name: Build Xcode project
  1086. run: |
  1087. xcodebuild -downloadPlatform iOS
  1088. 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
  1089. android-build:
  1090. runs-on: ubuntu-latest
  1091. steps:
  1092. - name: Clone
  1093. uses: actions/checkout@v4
  1094. # Disabled due to size (400MB) and always 0 cache hits
  1095. # - name: ccache
  1096. # uses: ggml-org/ccache-action@v1.2.16
  1097. # with:
  1098. # key: android-build
  1099. # evict-old-files: 1d
  1100. - name: Set up JDK
  1101. uses: actions/setup-java@v3
  1102. with:
  1103. java-version: 17
  1104. distribution: zulu
  1105. - name: Setup Android SDK
  1106. uses: android-actions/setup-android@v3
  1107. with:
  1108. log-accepted-android-sdk-licenses: false
  1109. - name: Build
  1110. run: |
  1111. cd examples/llama.android
  1112. ./gradlew build --no-daemon
  1113. android-ndk-build:
  1114. runs-on: ubuntu-latest
  1115. env:
  1116. OPENCL_VERSION: 2025.07.22
  1117. strategy:
  1118. matrix:
  1119. include:
  1120. - build: 'arm64-cpu'
  1121. defines: '-D ANDROID_ABI=arm64-v8a -D ANDROID_PLATFORM=android-31 -D CMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -D GGML_NATIVE=OFF -DGGML_CPU_ARM_ARCH=armv8.5-a+fp16+i8mm -G Ninja -D LLAMA_CURL=OFF -D GGML_OPENMP=OFF'
  1122. - build: 'arm64-snapdragon'
  1123. defines: '--preset arm64-android-snapdragon-release'
  1124. steps:
  1125. - name: Clone
  1126. id: checkout
  1127. uses: actions/checkout@v4
  1128. - name: Install OpenCL Headers and Libs
  1129. id: install_opencl
  1130. if: ${{ matrix.build == 'arm64-snapdragon' }}
  1131. run: |
  1132. mkdir opencl
  1133. curl -L -o opencl/clhpp.tar.gz https://github.com/KhronosGroup/OpenCL-CLHPP/archive/refs/tags/v${OPENCL_VERSION}.tar.gz
  1134. curl -L -o opencl/headers.tar.gz https://github.com/KhronosGroup/OpenCL-Headers/archive/refs/tags/v${OPENCL_VERSION}.tar.gz
  1135. curl -L -o opencl/icd-loader.tar.gz https://github.com/KhronosGroup/OpenCL-ICD-Loader/archive/refs/tags/v${OPENCL_VERSION}.tar.gz
  1136. tar -xaf opencl/headers.tar.gz -C opencl
  1137. tar -xaf opencl/clhpp.tar.gz -C opencl
  1138. tar -xaf opencl/icd-loader.tar.gz -C opencl
  1139. sudo cp -r opencl/OpenCL-Headers-${OPENCL_VERSION}/CL ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include
  1140. sudo cp -r opencl/OpenCL-CLHPP-${OPENCL_VERSION}/include/CL/* ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/CL
  1141. cd opencl/OpenCL-ICD-Loader-${OPENCL_VERSION}
  1142. cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DOPENCL_ICD_LOADER_HEADERS_DIR=${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=31 -DANDROID_STL=c++_shared
  1143. cmake --build build
  1144. sudo cp build/libOpenCL.so ${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android
  1145. rm -rf opencl
  1146. - name: Install Hexagon SDK
  1147. id: install_hexsdk
  1148. if: ${{ matrix.build == 'arm64-snapdragon' }}
  1149. env:
  1150. HEXSDK_VER: 6.4.0.2
  1151. HEXTLS_VER: 19.0.04
  1152. run: |
  1153. curl -L -o hex-sdk.tar.gz https://github.com/snapdragon-toolchain/hexagon-sdk/releases/download/v$HEXSDK_VER/hexagon-sdk-v$HEXSDK_VER-amd64-lnx.tar.xz
  1154. mkdir hex-sdk
  1155. tar -xaf hex-sdk.tar.gz -C hex-sdk
  1156. ls -l hex-sdk
  1157. sudo mv hex-sdk /opt/hexagon
  1158. echo "HEXAGON_SDK_ROOT=/opt/hexagon/$HEXSDK_VER" >> "$GITHUB_ENV"
  1159. echo "HEXAGON_TOOLS_ROOT=/opt/hexagon/$HEXSDK_VER/tools/HEXAGON_Tools/$HEXTLS_VER" >> "$GITHUB_ENV"
  1160. echo "DEFAULT_HLOS_ARCH=64" >> "$GITHUB_ENV"
  1161. echo "DEFAULT_TOOLS_VARIANT=toolv19" >> "$GITHUB_ENV"
  1162. echo "DEFAULT_NO_QURT_INC=0" >> "$GITHUB_ENV"
  1163. echo "DEFAULT_DSP_ARCH=v73" >> "$GITHUB_ENV"
  1164. - name: Update CMake presets
  1165. id: update_presets
  1166. if: ${{ matrix.build == 'arm64-snapdragon' }}
  1167. run: |
  1168. cp docs/backend/hexagon/CMakeUserPresets.json .
  1169. - name: Build
  1170. id: ndk_build
  1171. run: |
  1172. cmake ${{ matrix.defines }} -B build
  1173. cmake --build build
  1174. cmake --install build --prefix pkg-adb/llama.cpp
  1175. - name: Test
  1176. id: cmake_test
  1177. run: |
  1178. echo "FIXME: test on devices"
  1179. openEuler-latest-cmake-cann:
  1180. if: ${{ github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'Ascend NPU') }}
  1181. defaults:
  1182. run:
  1183. shell: bash -el {0}
  1184. strategy:
  1185. matrix:
  1186. arch: [x86, aarch64]
  1187. cann:
  1188. - '8.1.RC1.alpha001-910b-openeuler22.03-py3.10'
  1189. device:
  1190. - 'ascend910b3'
  1191. build:
  1192. - 'Release'
  1193. runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
  1194. container: ascendai/cann:${{ matrix.cann }}
  1195. steps:
  1196. - name: Checkout
  1197. uses: actions/checkout@v4
  1198. - name: Dependencies
  1199. run: |
  1200. yum update -y
  1201. yum install -y git gcc gcc-c++ make cmake libcurl-devel
  1202. - name: Build
  1203. run: |
  1204. export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
  1205. cmake -S . -B build \
  1206. -DCMAKE_BUILD_TYPE=${{ matrix.build }} \
  1207. -DGGML_CANN=on \
  1208. -DSOC_TYPE=${{ matrix.device }}
  1209. cmake --build build -j $(nproc)
  1210. # TODO: simplify the following workflows using a matrix
  1211. # TODO: run lighter CI on PRs and the full CI only on master (if needed)
  1212. ggml-ci-x64-cpu-low-perf:
  1213. runs-on: ubuntu-22.04
  1214. steps:
  1215. - name: Clone
  1216. id: checkout
  1217. uses: actions/checkout@v4
  1218. - name: ccache
  1219. uses: ggml-org/ccache-action@v1.2.16
  1220. with:
  1221. key: ggml-ci-x64-cpu-low-perf
  1222. evict-old-files: 1d
  1223. - name: Dependencies
  1224. id: depends
  1225. run: |
  1226. sudo apt-get update
  1227. sudo apt-get install build-essential libcurl4-openssl-dev
  1228. - name: Test
  1229. id: ggml-ci
  1230. run: |
  1231. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1232. ggml-ci-arm64-cpu-low-perf:
  1233. runs-on: ubuntu-22.04-arm
  1234. steps:
  1235. - name: Clone
  1236. id: checkout
  1237. uses: actions/checkout@v4
  1238. - name: ccache
  1239. uses: ggml-org/ccache-action@v1.2.16
  1240. with:
  1241. key: ggml-ci-arm64-cpu-low-perf
  1242. evict-old-files: 1d
  1243. - name: Dependencies
  1244. id: depends
  1245. run: |
  1246. sudo apt-get update
  1247. sudo apt-get install build-essential libcurl4-openssl-dev
  1248. - name: Test
  1249. id: ggml-ci
  1250. run: |
  1251. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1252. ggml-ci-x64-cpu-high-perf:
  1253. runs-on: ubuntu-22.04
  1254. steps:
  1255. - name: Clone
  1256. id: checkout
  1257. uses: actions/checkout@v4
  1258. - name: ccache
  1259. uses: ggml-org/ccache-action@v1.2.16
  1260. with:
  1261. key: ggml-ci-x64-cpu-high-perf
  1262. evict-old-files: 1d
  1263. - name: Dependencies
  1264. id: depends
  1265. run: |
  1266. sudo apt-get update
  1267. sudo apt-get install build-essential libcurl4-openssl-dev
  1268. - name: Test
  1269. id: ggml-ci
  1270. run: |
  1271. LLAMA_ARG_THREADS=$(nproc) bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1272. ggml-ci-arm64-cpu-high-perf:
  1273. runs-on: ubuntu-22.04-arm
  1274. steps:
  1275. - name: Clone
  1276. id: checkout
  1277. uses: actions/checkout@v4
  1278. - name: ccache
  1279. uses: ggml-org/ccache-action@v1.2.16
  1280. with:
  1281. key: ggml-ci-arm64-cpu-high-perf
  1282. evict-old-files: 1d
  1283. - name: Dependencies
  1284. id: depends
  1285. run: |
  1286. sudo apt-get update
  1287. sudo apt-get install build-essential libcurl4-openssl-dev
  1288. - name: Test
  1289. id: ggml-ci
  1290. run: |
  1291. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_SVE=1 GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1292. ggml-ci-arm64-cpu-high-perf-sve:
  1293. runs-on: ubuntu-22.04-arm
  1294. steps:
  1295. - name: Clone
  1296. id: checkout
  1297. uses: actions/checkout@v4
  1298. - name: ccache
  1299. uses: ggml-org/ccache-action@v1.2.16
  1300. with:
  1301. key: ggml-ci-arm64-cpu-high-perf-sve
  1302. evict-old-files: 1d
  1303. - name: Dependencies
  1304. id: depends
  1305. run: |
  1306. sudo apt-get update
  1307. sudo apt-get install build-essential libcurl4-openssl-dev
  1308. - name: Test
  1309. id: ggml-ci
  1310. run: |
  1311. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1312. ggml-ci-x64-nvidia-cuda:
  1313. runs-on: [self-hosted, Linux, X64, NVIDIA]
  1314. steps:
  1315. - name: Clone
  1316. id: checkout
  1317. uses: actions/checkout@v4
  1318. - name: Test
  1319. id: ggml-ci
  1320. run: |
  1321. nvidia-smi
  1322. GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1323. ggml-ci-x64-nvidia-vulkan-cm:
  1324. runs-on: [self-hosted, Linux, X64, NVIDIA]
  1325. steps:
  1326. - name: Clone
  1327. id: checkout
  1328. uses: actions/checkout@v4
  1329. - name: Test
  1330. id: ggml-ci
  1331. run: |
  1332. vulkaninfo --summary
  1333. GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1334. ggml-ci-x64-nvidia-vulkan-cm2:
  1335. runs-on: [self-hosted, Linux, X64, NVIDIA, COOPMAT2]
  1336. steps:
  1337. - name: Clone
  1338. id: checkout
  1339. uses: actions/checkout@v4
  1340. - name: Test
  1341. id: ggml-ci
  1342. run: |
  1343. vulkaninfo --summary
  1344. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1345. ggml-ci-x64-cpu-amx:
  1346. runs-on: [self-hosted, Linux, X64, CPU, AMX]
  1347. steps:
  1348. - name: Clone
  1349. id: checkout
  1350. uses: actions/checkout@v4
  1351. - name: Test
  1352. id: ggml-ci
  1353. run: |
  1354. bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1355. ggml-ci-x64-amd-vulkan:
  1356. runs-on: [self-hosted, Linux, X64, AMD]
  1357. steps:
  1358. - name: Clone
  1359. id: checkout
  1360. uses: actions/checkout@v4
  1361. - name: Test
  1362. id: ggml-ci
  1363. run: |
  1364. vulkaninfo --summary
  1365. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1366. ggml-ci-x64-amd-rocm:
  1367. runs-on: [self-hosted, Linux, X64, AMD]
  1368. steps:
  1369. - name: Clone
  1370. id: checkout
  1371. uses: actions/checkout@v4
  1372. - name: Test
  1373. id: ggml-ci
  1374. run: |
  1375. amd-smi static
  1376. GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1377. ggml-ci-mac-metal:
  1378. runs-on: [self-hosted, macOS, ARM64]
  1379. steps:
  1380. - name: Clone
  1381. id: checkout
  1382. uses: actions/checkout@v4
  1383. - name: Test
  1384. id: ggml-ci
  1385. run: |
  1386. GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
  1387. ggml-ci-mac-vulkan:
  1388. runs-on: [self-hosted, macOS, ARM64]
  1389. steps:
  1390. - name: Clone
  1391. id: checkout
  1392. uses: actions/checkout@v4
  1393. - name: Test
  1394. id: ggml-ci
  1395. run: |
  1396. vulkaninfo --summary
  1397. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
  1398. ggml-ci-arm64-cpu-kleidiai:
  1399. runs-on: ubuntu-22.04-arm
  1400. steps:
  1401. - name: Clone
  1402. id: checkout
  1403. uses: actions/checkout@v4
  1404. - name: ccache
  1405. uses: ggml-org/ccache-action@v1.2.16
  1406. with:
  1407. key: ggml-ci-arm64-cpu-kleidiai
  1408. evict-old-files: 1d
  1409. - name: Dependencies
  1410. id: depends
  1411. run: |
  1412. sudo apt-get update
  1413. sudo apt-get install -y build-essential libcurl4-openssl-dev
  1414. - name: Test
  1415. id: ggml-ci
  1416. run: |
  1417. GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1418. ggml-ci-arm64-graviton4-kleidiai:
  1419. runs-on: ah-ubuntu_22_04-c8g_8x
  1420. steps:
  1421. - name: Clone
  1422. id: checkout
  1423. uses: actions/checkout@v4
  1424. - name: Dependencies
  1425. id: depends
  1426. run: |
  1427. set -euxo pipefail
  1428. sudo apt-get update
  1429. sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \
  1430. apt-get install -y \
  1431. build-essential \
  1432. libcurl4-openssl-dev \
  1433. python3-venv \
  1434. gpg \
  1435. wget \
  1436. time \
  1437. git-lfs
  1438. git lfs install
  1439. # install the latest cmake
  1440. sudo install -d /usr/share/keyrings
  1441. wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc \
  1442. | gpg --dearmor \
  1443. | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
  1444. echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' \
  1445. | sudo tee /etc/apt/sources.list.d/kitware.list
  1446. sudo apt-get update
  1447. sudo apt-get install -y cmake
  1448. - name: ccache
  1449. uses: ggml-org/ccache-action@v1.2.16
  1450. with:
  1451. key: ggml-ci-arm64-graviton4-kleidiai
  1452. evict-old-files: 1d
  1453. - name: Test
  1454. id: ggml-ci
  1455. run: |
  1456. GG_BUILD_KLEIDIAI=1 \
  1457. GG_BUILD_EXTRA_TESTS_0=1 \
  1458. bash ./ci/run.sh ./tmp/results ./tmp/mnt