build.yml 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724
  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. chip_type: ['910b', '310p']
  1188. build: ['Release']
  1189. runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
  1190. container: ascendai/cann:${{ matrix.chip_type == '910b' && '8.3.rc1.alpha001-910b-openeuler22.03-py3.11' || '8.2.rc1-310p-openeuler22.03-py3.11' }}
  1191. steps:
  1192. - name: Checkout
  1193. uses: actions/checkout@v4
  1194. - name: Dependencies
  1195. run: |
  1196. yum update -y
  1197. yum install -y git gcc gcc-c++ make cmake libcurl-devel
  1198. - name: Build
  1199. run: |
  1200. export LD_LIBRARY_PATH=${ASCEND_TOOLKIT_HOME}/lib64:${ASCEND_TOOLKIT_HOME}/$(uname -m)-linux/devlib/:${LD_LIBRARY_PATH}
  1201. cmake -S . -B build \
  1202. -DCMAKE_BUILD_TYPE=${{ matrix.build }} \
  1203. -DGGML_CANN=on \
  1204. -DSOC_TYPE=ascend${{ matrix.chip_type }}
  1205. cmake --build build -j $(nproc)
  1206. # TODO: simplify the following workflows using a matrix
  1207. # TODO: run lighter CI on PRs and the full CI only on master (if needed)
  1208. ggml-ci-x64-cpu-low-perf:
  1209. runs-on: ubuntu-22.04
  1210. steps:
  1211. - name: Clone
  1212. id: checkout
  1213. uses: actions/checkout@v4
  1214. - name: ccache
  1215. uses: ggml-org/ccache-action@v1.2.16
  1216. with:
  1217. key: ggml-ci-x64-cpu-low-perf
  1218. evict-old-files: 1d
  1219. - name: Dependencies
  1220. id: depends
  1221. run: |
  1222. sudo apt-get update
  1223. sudo apt-get install build-essential libcurl4-openssl-dev
  1224. - name: Test
  1225. id: ggml-ci
  1226. run: |
  1227. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1228. ggml-ci-arm64-cpu-low-perf:
  1229. runs-on: ubuntu-22.04-arm
  1230. steps:
  1231. - name: Clone
  1232. id: checkout
  1233. uses: actions/checkout@v4
  1234. - name: ccache
  1235. uses: ggml-org/ccache-action@v1.2.16
  1236. with:
  1237. key: ggml-ci-arm64-cpu-low-perf
  1238. evict-old-files: 1d
  1239. - name: Dependencies
  1240. id: depends
  1241. run: |
  1242. sudo apt-get update
  1243. sudo apt-get install build-essential libcurl4-openssl-dev
  1244. - name: Test
  1245. id: ggml-ci
  1246. run: |
  1247. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_LOW_PERF=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1248. ggml-ci-x64-cpu-high-perf:
  1249. runs-on: ubuntu-22.04
  1250. steps:
  1251. - name: Clone
  1252. id: checkout
  1253. uses: actions/checkout@v4
  1254. - name: ccache
  1255. uses: ggml-org/ccache-action@v1.2.16
  1256. with:
  1257. key: ggml-ci-x64-cpu-high-perf
  1258. evict-old-files: 1d
  1259. - name: Dependencies
  1260. id: depends
  1261. run: |
  1262. sudo apt-get update
  1263. sudo apt-get install build-essential libcurl4-openssl-dev
  1264. - name: Test
  1265. id: ggml-ci
  1266. run: |
  1267. LLAMA_ARG_THREADS=$(nproc) bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1268. ggml-ci-arm64-cpu-high-perf:
  1269. runs-on: ubuntu-22.04-arm
  1270. steps:
  1271. - name: Clone
  1272. id: checkout
  1273. uses: actions/checkout@v4
  1274. - name: ccache
  1275. uses: ggml-org/ccache-action@v1.2.16
  1276. with:
  1277. key: ggml-ci-arm64-cpu-high-perf
  1278. evict-old-files: 1d
  1279. - name: Dependencies
  1280. id: depends
  1281. run: |
  1282. sudo apt-get update
  1283. sudo apt-get install build-essential libcurl4-openssl-dev
  1284. - name: Test
  1285. id: ggml-ci
  1286. run: |
  1287. 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
  1288. ggml-ci-arm64-cpu-high-perf-sve:
  1289. runs-on: ubuntu-22.04-arm
  1290. steps:
  1291. - name: Clone
  1292. id: checkout
  1293. uses: actions/checkout@v4
  1294. - name: ccache
  1295. uses: ggml-org/ccache-action@v1.2.16
  1296. with:
  1297. key: ggml-ci-arm64-cpu-high-perf-sve
  1298. evict-old-files: 1d
  1299. - name: Dependencies
  1300. id: depends
  1301. run: |
  1302. sudo apt-get update
  1303. sudo apt-get install build-essential libcurl4-openssl-dev
  1304. - name: Test
  1305. id: ggml-ci
  1306. run: |
  1307. LLAMA_ARG_THREADS=$(nproc) GG_BUILD_NO_BF16=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1308. ggml-ci-x64-nvidia-cuda:
  1309. runs-on: [self-hosted, Linux, X64, NVIDIA]
  1310. steps:
  1311. - name: Clone
  1312. id: checkout
  1313. uses: actions/checkout@v4
  1314. - name: Test
  1315. id: ggml-ci
  1316. run: |
  1317. nvidia-smi
  1318. GG_BUILD_CUDA=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1319. ggml-ci-x64-nvidia-vulkan-cm:
  1320. runs-on: [self-hosted, Linux, X64, NVIDIA]
  1321. steps:
  1322. - name: Clone
  1323. id: checkout
  1324. uses: actions/checkout@v4
  1325. - name: Test
  1326. id: ggml-ci
  1327. run: |
  1328. vulkaninfo --summary
  1329. GG_BUILD_VULKAN=1 GGML_VK_DISABLE_COOPMAT2=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1330. ggml-ci-x64-nvidia-vulkan-cm2:
  1331. runs-on: [self-hosted, Linux, X64, NVIDIA, COOPMAT2]
  1332. steps:
  1333. - name: Clone
  1334. id: checkout
  1335. uses: actions/checkout@v4
  1336. - name: Test
  1337. id: ggml-ci
  1338. run: |
  1339. vulkaninfo --summary
  1340. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1341. ggml-ci-x64-cpu-amx:
  1342. runs-on: [self-hosted, Linux, X64, CPU, AMX]
  1343. steps:
  1344. - name: Clone
  1345. id: checkout
  1346. uses: actions/checkout@v4
  1347. - name: Test
  1348. id: ggml-ci
  1349. run: |
  1350. bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1351. ggml-ci-x64-amd-vulkan:
  1352. runs-on: [self-hosted, Linux, X64, AMD]
  1353. steps:
  1354. - name: Clone
  1355. id: checkout
  1356. uses: actions/checkout@v4
  1357. - name: Test
  1358. id: ggml-ci
  1359. run: |
  1360. vulkaninfo --summary
  1361. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1362. ggml-ci-x64-amd-rocm:
  1363. runs-on: [self-hosted, Linux, X64, AMD]
  1364. steps:
  1365. - name: Clone
  1366. id: checkout
  1367. uses: actions/checkout@v4
  1368. - name: Test
  1369. id: ggml-ci
  1370. run: |
  1371. amd-smi static
  1372. GG_BUILD_ROCM=1 GG_BUILD_AMDGPU_TARGETS="gfx1101" bash ./ci/run.sh ~/results/llama.cpp /mnt/llama.cpp
  1373. ggml-ci-mac-metal:
  1374. runs-on: [self-hosted, macOS, ARM64]
  1375. steps:
  1376. - name: Clone
  1377. id: checkout
  1378. uses: actions/checkout@v4
  1379. - name: Test
  1380. id: ggml-ci
  1381. run: |
  1382. GG_BUILD_METAL=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
  1383. ggml-ci-mac-vulkan:
  1384. runs-on: [self-hosted, macOS, ARM64]
  1385. steps:
  1386. - name: Clone
  1387. id: checkout
  1388. uses: actions/checkout@v4
  1389. - name: Test
  1390. id: ggml-ci
  1391. run: |
  1392. vulkaninfo --summary
  1393. GG_BUILD_VULKAN=1 bash ./ci/run.sh ~/results/llama.cpp ~/mnt/llama.cpp
  1394. ggml-ci-arm64-cpu-kleidiai:
  1395. runs-on: ubuntu-22.04-arm
  1396. steps:
  1397. - name: Clone
  1398. id: checkout
  1399. uses: actions/checkout@v4
  1400. - name: ccache
  1401. uses: ggml-org/ccache-action@v1.2.16
  1402. with:
  1403. key: ggml-ci-arm64-cpu-kleidiai
  1404. evict-old-files: 1d
  1405. - name: Dependencies
  1406. id: depends
  1407. run: |
  1408. sudo apt-get update
  1409. sudo apt-get install -y build-essential libcurl4-openssl-dev
  1410. - name: Test
  1411. id: ggml-ci
  1412. run: |
  1413. GG_BUILD_KLEIDIAI=1 GG_BUILD_EXTRA_TESTS_0=1 bash ./ci/run.sh ./tmp/results ./tmp/mnt
  1414. ggml-ci-arm64-graviton4-kleidiai:
  1415. runs-on: ah-ubuntu_22_04-c8g_8x
  1416. steps:
  1417. - name: Clone
  1418. id: checkout
  1419. uses: actions/checkout@v4
  1420. - name: Dependencies
  1421. id: depends
  1422. run: |
  1423. set -euxo pipefail
  1424. sudo apt-get update
  1425. sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a \
  1426. apt-get install -y \
  1427. build-essential \
  1428. libcurl4-openssl-dev \
  1429. python3-venv \
  1430. gpg \
  1431. wget \
  1432. time \
  1433. git-lfs
  1434. git lfs install
  1435. # install the latest cmake
  1436. sudo install -d /usr/share/keyrings
  1437. wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc \
  1438. | gpg --dearmor \
  1439. | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
  1440. echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main' \
  1441. | sudo tee /etc/apt/sources.list.d/kitware.list
  1442. sudo apt-get update
  1443. sudo apt-get install -y cmake
  1444. - name: ccache
  1445. uses: ggml-org/ccache-action@v1.2.16
  1446. with:
  1447. key: ggml-ci-arm64-graviton4-kleidiai
  1448. evict-old-files: 1d
  1449. - name: Test
  1450. id: ggml-ci
  1451. run: |
  1452. GG_BUILD_KLEIDIAI=1 \
  1453. GG_BUILD_EXTRA_TESTS_0=1 \
  1454. bash ./ci/run.sh ./tmp/results ./tmp/mnt