Merge pull request #1018 from cpunion/fix-libunwind
runtime: fix libunwind to compatible with homebrew linux
This commit is contained in:
23
.github/workflows/llgo.yml
vendored
23
.github/workflows/llgo.yml
vendored
@@ -10,7 +10,23 @@ on:
|
|||||||
branches: [ "**" ]
|
branches: [ "**" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
download-model:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Download model file
|
||||||
|
run: |
|
||||||
|
mkdir -p ./_demo/llama2-c
|
||||||
|
wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
||||||
|
|
||||||
|
- name: Upload model as artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: llama2-model
|
||||||
|
path: ./_demo/llama2-c/stories15M.bin
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
llgo:
|
llgo:
|
||||||
|
needs: download-model
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -26,9 +42,13 @@ jobs:
|
|||||||
uses: ./.github/actions/setup-deps
|
uses: ./.github/actions/setup-deps
|
||||||
with:
|
with:
|
||||||
llvm-version: ${{matrix.llvm}}
|
llvm-version: ${{matrix.llvm}}
|
||||||
|
- name: Download model artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: llama2-model
|
||||||
|
path: ./_demo/llama2-c/
|
||||||
- name: Install further optional dependencies for demos
|
- name: Install further optional dependencies for demos
|
||||||
run: |
|
run: |
|
||||||
wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
|
||||||
py_deps=(
|
py_deps=(
|
||||||
numpy # for github.com/goplus/llgo/py/numpy
|
numpy # for github.com/goplus/llgo/py/numpy
|
||||||
torch # for github.com/goplus/llgo/py/torch
|
torch # for github.com/goplus/llgo/py/torch
|
||||||
@@ -112,7 +132,6 @@ jobs:
|
|||||||
llvm-version: ${{matrix.llvm}}
|
llvm-version: ${{matrix.llvm}}
|
||||||
- name: Install further optional dependencies for demos
|
- name: Install further optional dependencies for demos
|
||||||
run: |
|
run: |
|
||||||
wget -P ./_demo/llama2-c https://huggingface.co/karpathy/tinyllamas/resolve/main/stories15M.bin
|
|
||||||
py_deps=(
|
py_deps=(
|
||||||
numpy # for github.com/goplus/llgo/py/numpy
|
numpy # for github.com/goplus/llgo/py/numpy
|
||||||
torch # for github.com/goplus/llgo/py/torch
|
torch # for github.com/goplus/llgo/py/torch
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define UNW_LOCAL_ONLY
|
#define UNW_LOCAL_ONLY
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LLGoPackage = "link"
|
LLGoPackage = "link: $(llvm-config --ldflags --libs); -lunwind"
|
||||||
LLGoFiles = "_wrap/debug.c"
|
LLGoFiles = "$(llvm-config --cflags): _wrap/debug.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Info struct {
|
type Info struct {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#if defined(__linux__)
|
#if defined(__linux__)
|
||||||
#define UNW_LOCAL_ONLY
|
#define UNW_LOCAL_ONLY
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
LLGoPackage = "link"
|
LLGoPackage = "link: $(llvm-config --ldflags --libs); -lunwind"
|
||||||
LLGoFiles = "_wrap/debug.c"
|
LLGoFiles = "$(llvm-config --cflags): _wrap/debug.c"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Info struct {
|
type Info struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user