]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
Fix build for gcc 8 and test in CI (#1154)
authorStephan Walter <redacted>
Mon, 24 Apr 2023 15:38:26 +0000 (15:38 +0000)
committerGitHub <redacted>
Mon, 24 Apr 2023 15:38:26 +0000 (15:38 +0000)
.github/workflows/build.yml
ggml.c

index 7c40b0c12ce89760af6636a5381ae0f1b43a978b..179080576f249bff53067a8f6622a902c8943b4e 100644 (file)
@@ -19,8 +19,8 @@ env:
  BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
 
 jobs:
-  ubuntu-latest-make:
-    runs-on: ubuntu-latest
+  ubuntu-focal-make:
+    runs-on: ubuntu-20.04
 
     steps:
       - name: Clone
@@ -31,12 +31,12 @@ jobs:
         id: depends
         run: |
           sudo apt-get update
-          sudo apt-get install build-essential
+          sudo apt-get install build-essential gcc-8
 
       - name: Build
         id: make_build
         run: |
-          make
+          CC=gcc-8 make
 
   ubuntu-latest-cmake:
     runs-on: ubuntu-latest
@@ -216,7 +216,7 @@ jobs:
     runs-on: ubuntu-latest
 
     needs:
-      - ubuntu-latest-make
+      - ubuntu-focal-make
       - ubuntu-latest-cmake
       - macOS-latest-make
       - macOS-latest-cmake
diff --git a/ggml.c b/ggml.c
index f8f73af3e75388ca78ef058da1596f4bb62910e3..6e46c0e5ad1dab8dba7c7111faa6502011340189 100644 (file)
--- a/ggml.c
+++ b/ggml.c
@@ -436,7 +436,7 @@ static const size_t CACHE_LINE_SIZE_F32 = CACHE_LINE_SIZE/sizeof(float);
 static inline __m128i bytes_from_nibbles_16(const uint8_t * rsi)
 {
     // Load 8 bytes from memory
-    __m128i tmp = _mm_loadu_si64( ( const __m128i* )rsi );
+    __m128i tmp = _mm_loadl_epi64( ( const __m128i* )rsi );
 
     // Expand bytes into uint16_t values
     __m128i bytes = _mm_cvtepu8_epi16( tmp );