Skip to content

Commit f84b4cb

Browse files
swplayer1537
authored andcommitted
Fix build for gcc 8 and test in CI (ggml-org#1154)
1 parent 7aa501c commit f84b4cb

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ env:
1919
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
2020

2121
jobs:
22-
ubuntu-latest-make:
23-
if: github.event.pull_request.draft == false
24-
25-
runs-on: ubuntu-latest
22+
ubuntu-focal-make:
23+
runs-on: ubuntu-20.04
2624

2725
steps:
2826
- name: Clone
@@ -33,12 +31,12 @@ jobs:
3331
id: depends
3432
run: |
3533
sudo apt-get update
36-
sudo apt-get install build-essential
34+
sudo apt-get install build-essential gcc-8
3735
3836
- name: Build
3937
id: make_build
4038
run: |
41-
make
39+
CC=gcc-8 make
4240
4341
ubuntu-latest-cmake:
4442
if: github.event.pull_request.draft == false
@@ -228,7 +226,7 @@ jobs:
228226
runs-on: ubuntu-latest
229227

230228
needs:
231-
- ubuntu-latest-make
229+
- ubuntu-focal-make
232230
- ubuntu-latest-cmake
233231
- macOS-latest-make
234232
- macOS-latest-cmake

ggml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ static const size_t CACHE_LINE_SIZE_F32 = CACHE_LINE_SIZE/sizeof(float);
473473
static inline __m128i bytes_from_nibbles_16(const uint8_t * rsi)
474474
{
475475
// Load 8 bytes from memory
476-
__m128i tmp = _mm_loadu_si64( ( const __m128i* )rsi );
476+
__m128i tmp = _mm_loadl_epi64( ( const __m128i* )rsi );
477477

478478
// Expand bytes into uint16_t values
479479
__m128i bytes = _mm_cvtepu8_epi16( tmp );

0 commit comments

Comments
 (0)