Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
946431d5
"git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "df2e145e5f7fbd79979e883ee398b840a74694b3"
Commit
946431d5
authored
Dec 22, 2023
by
Michael Yang
Browse files
build cuda and rocm
parent
06101260
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
3 deletions
+79
-3
.github/workflows/test.yaml
.github/workflows/test.yaml
+79
-3
No files found.
.github/workflows/test.yaml
View file @
946431d5
...
@@ -28,8 +28,66 @@ jobs:
...
@@ -28,8 +28,66 @@ jobs:
-
uses
:
actions/upload-artifact@v4
-
uses
:
actions/upload-artifact@v4
with
:
with
:
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
path
:
|
path
:
llm/llama.cpp/build/**/lib/*
llm/llama.cpp/build/**/lib/*
generate-cuda
:
strategy
:
matrix
:
cuda-version
:
-
'
11.8.0'
runs-on
:
ubuntu-latest
container
:
nvidia/cuda:${{ matrix.cuda-version }}-devel-ubuntu20.04
steps
:
-
run
:
|
apt-get update && apt-get install -y git build-essential curl
curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-linux-x86_64.tar.gz \
| tar -zx -C /usr --strip-components 1
env
:
DEBIAN_FRONTEND
:
noninteractive
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-go@v4
with
:
go-version
:
'
1.21'
cache
:
true
-
run
:
go get ./...
-
run
:
|
git config --global --add safe.directory /__w/ollama/ollama
go generate -x ./...
env
:
OLLAMA_SKIP_CPU_GENERATE
:
'
1'
-
uses
:
actions/upload-artifact@v4
with
:
name
:
cuda-${{ matrix.cuda-version }}-libraries
path
:
llm/llama.cpp/build/**/lib/*
generate-rocm
:
strategy
:
matrix
:
rocm-version
:
-
'
5.7.1'
-
'
6.0'
runs-on
:
ubuntu-latest
container
:
rocm/dev-ubuntu-20.04:${{ matrix.rocm-version }}
steps
:
-
run
:
|
apt-get update && apt-get install -y git build-essential curl rocm-libs
curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.28.1/cmake-3.28.1-linux-x86_64.tar.gz \
| tar -zx -C /usr --strip-components 1
env
:
DEBIAN_FRONTEND
:
noninteractive
-
uses
:
actions/checkout@v4
-
uses
:
actions/setup-go@v4
with
:
go-version
:
'
1.21'
cache
:
true
-
run
:
go get ./...
-
run
:
|
git config --global --add safe.directory /__w/ollama/ollama
go generate -x ./...
env
:
OLLAMA_SKIP_CPU_GENERATE
:
'
1'
-
uses
:
actions/upload-artifact@v4
with
:
name
:
rocm-${{ matrix.rocm-version }}-libraries
path
:
llm/llama.cpp/build/**/lib/*
lint
:
lint
:
strategy
:
strategy
:
matrix
:
matrix
:
...
@@ -69,7 +127,10 @@ jobs:
...
@@ -69,7 +127,10 @@ jobs:
if
:
${{ startsWith(matrix.os, 'windows-') }}
if
:
${{ startsWith(matrix.os, 'windows-') }}
-
uses
:
golangci/golangci-lint-action@v3
-
uses
:
golangci/golangci-lint-action@v3
test
:
test
:
needs
:
generate
needs
:
-
generate
-
generate-cuda
-
generate-rocm
strategy
:
strategy
:
matrix
:
matrix
:
os
:
[
ubuntu-latest
,
macos-latest
,
windows-latest
]
os
:
[
ubuntu-latest
,
macos-latest
,
windows-latest
]
...
@@ -96,5 +157,20 @@ jobs:
...
@@ -96,5 +157,20 @@ jobs:
with
:
with
:
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
path
:
llm/llama.cpp/build
path
:
llm/llama.cpp/build
-
if
:
${{ matrix.os == 'ubuntu-latest' }}
uses
:
actions/download-artifact@v4
with
:
name
:
cuda-11.8.0-libraries
path
:
llm/llama.cpp/build
-
if
:
${{ matrix.os == 'ubuntu-latest' }}
uses
:
actions/download-artifact@v4
with
:
name
:
rocm-5.7.1-libraries
path
:
llm/llama.cpp/build
-
if
:
${{ matrix.os == 'ubuntu-latest' }}
uses
:
actions/download-artifact@v4
with
:
name
:
rocm-6.0-libraries
path
:
llm/llama.cpp/build
-
run
:
go build
-
run
:
go build
-
run
:
go test -v ./...
-
run
:
go test -v ./...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment