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
c363282f
Unverified
Commit
c363282f
authored
Mar 27, 2024
by
Michael Yang
Committed by
GitHub
Mar 27, 2024
Browse files
Merge pull request #3375 from ollama/mxyng/conditional-generate
only generate cuda/rocm when changes to llm detected
parents
913306f4
5b0c48d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
.github/workflows/test.yaml
.github/workflows/test.yaml
+22
-0
No files found.
.github/workflows/test.yaml
View file @
c363282f
...
@@ -9,6 +9,24 @@ on:
...
@@ -9,6 +9,24 @@ on:
-
'
!README.md'
-
'
!README.md'
jobs
:
jobs
:
changes
:
runs-on
:
ubuntu-latest
outputs
:
GENERATE_CUDA
:
${{ steps.changes.outputs.GENERATE_CUDA }}
GENERATE_ROCM
:
${{ steps.changes.outputs.GENERATE_ROCM }}
steps
:
-
id
:
changes
run
:
|
changed() {
git diff-tree -r --no-commit-id --name-only $GITHUB_BASE_REF $GITHUB_HEAD_REF \
| xargs python3 -c "import sys; print(any([x.startswith('$1') for x in sys.argv[1:]]))"
}
{
echo GENERATE_CUDA=$(changed llm)
echo GENERATE_ROCM=$(changed llm)
} >>$GITHUB_OUTPUT
generate
:
generate
:
strategy
:
strategy
:
matrix
:
matrix
:
...
@@ -46,6 +64,8 @@ jobs:
...
@@ -46,6 +64,8 @@ jobs:
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
name
:
${{ matrix.os }}-${{ matrix.arch }}-libraries
path
:
llm/llama.cpp/build/**/lib/*
path
:
llm/llama.cpp/build/**/lib/*
generate-cuda
:
generate-cuda
:
needs
:
[
changes
]
if
:
${{ needs.changes.outputs.GENERATE_CUDA == 'True' }}
strategy
:
strategy
:
matrix
:
matrix
:
cuda-version
:
cuda-version
:
...
@@ -75,6 +95,8 @@ jobs:
...
@@ -75,6 +95,8 @@ jobs:
name
:
cuda-${{ matrix.cuda-version }}-libraries
name
:
cuda-${{ matrix.cuda-version }}-libraries
path
:
llm/llama.cpp/build/**/lib/*
path
:
llm/llama.cpp/build/**/lib/*
generate-rocm
:
generate-rocm
:
needs
:
[
changes
]
if
:
${{ needs.changes.outputs.GENERATE_ROCM == 'True' }}
strategy
:
strategy
:
matrix
:
matrix
:
rocm-version
:
rocm-version
:
...
...
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