-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Workflow update - PART 1 #1416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Workflow update - PART 1 #1416
Changes from all commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
d2c1973
Update build-wheels-cuda.yaml
Smartappli 4f0cd41
Update build-wheels-cuda.yaml
Smartappli 3e012ca
Merge branch 'abetlen:main' into cuda
Smartappli 04f509d
revert
Smartappli 34d4475
Bump pyhton from 3.8 to 3.9
Smartappli f7b3dd0
Remove python 3.8
Smartappli a903572
Remove Python 3.7 and 3.8 deprecated
Smartappli e890e2e
Bump python from 3.8 to 3.9
Smartappli 0ce29fe
Add python 3.9
Smartappli 63c74d7
Add python 3.9, remove macos-11 deprecated, add macos-14
Smartappli 864d190
Bump python 3.8 to 3.9
Smartappli 1934440
Add python 3.13
Smartappli 525b7af
Add python 3.13
Smartappli b94a9e2
python 3.13 remove
Smartappli d24c882
remove python 3.13
Smartappli a5d4a37
remove python 3.8
Smartappli 2e412af
Bump macos-13 to macos-14
Smartappli b1a7cde
Update build-wheels-metal.yaml
Smartappli 8517a80
Update build-wheels-metal.yaml
Smartappli d24d08a
Update build-and-release.yaml
Smartappli 9efb21f
Update build-and-release.yaml
Smartappli 15be4a2
Update build-and-release.yaml
Smartappli d67c7a6
Update build-and-release.yaml
Smartappli 561e1ba
Update build-and-release.yaml
Smartappli 8486229
Update build-and-release.yaml
Smartappli 56b5a08
Update build-and-release.yaml
Smartappli 3a6b448
Update build-and-release.yaml
Smartappli 7f8954f
Update build-wheels-metal.yaml
Smartappli cfead6a
Update generate-index-from-release.yaml
Smartappli af5030f
Merge branch 'abetlen:main' into cuda
Smartappli 976cb03
Update test.yaml
Smartappli bc99285
Update test-pypi.yaml
Smartappli 1b620c4
Update publish.yaml
Smartappli e2f0259
Update publish-to-test.yaml
Smartappli 319ddf1
Update build-wheels-cuda.yaml
Smartappli eb3f734
Update build-wheels-cuda.yaml
Smartappli 3a61206
remove DEPRECATED 32 bits
Smartappli 2095372
Update build-and-release.yaml
Smartappli 4ebedc1
Update build-and-release.yaml
Smartappli 8c2120d
Update build-and-release.yaml
Smartappli 1b8f088
Update build-and-release.yaml
Smartappli bfced4f
Update build-and-release.yaml
Smartappli 698efb7
Update build-and-release.yaml
Smartappli 6af3934
Update build-and-release.yaml
Smartappli 74f6cdf
Update build-and-release.yaml
Smartappli 0aefa55
Update build-and-release.yaml
Smartappli d043348
Merge branch 'main' into cuda
Smartappli caceb89
Update build-and-release.yaml
Smartappli 78b9de3
Update build-and-release.yaml
Smartappli 1552e8e
Update build-and-release.yaml
Smartappli 93f143e
Merge branch 'main' into cuda
Smartappli f342418
Update build-and-release.yaml
Smartappli 0ce4fab
Update build-wheels-metal.yaml
Smartappli 32d77b9
Update build-wheels-cuda.yaml
Smartappli d61dbd8
Update test.yaml
Smartappli 816476f
Update test-pypi.yaml
Smartappli d15fec6
Update test.yaml
Smartappli 3c9ab30
Update publish-to-test.yaml
Smartappli 0752f74
Update build-wheels-metal.yaml
Smartappli 8aaba56
Update build-wheels-cuda.yaml
Smartappli c6f2df8
Update build-and-release.yaml
Smartappli 04af8b6
Update build-and-release.yaml
Smartappli f0df0df
Merge branch 'main' into cuda
Smartappli df61135
Update build-wheels-metal.yaml
Smartappli 561013f
Update build-wheels-metal.yaml
Smartappli 6e3a5e6
Merge branch 'main' into cuda
Smartappli 39e74ca
Update build-and-release.yaml
Smartappli e15305f
Update build-wheels-metal.yaml
Smartappli ccd8bbb
Update build-wheels-metal.yaml
Smartappli bc406ad
Update build-and-release.yaml
Smartappli 0c0946e
Update build-and-release.yaml
Smartappli a4f25b4
Update build-and-release.yaml
Smartappli 5e1d021
Update build-wheels-metal.yaml
Smartappli 79619a5
Update build-and-release.yaml
Smartappli 0e7d135
Update build-and-release.yaml
Smartappli 2fba497
Update build-and-release.yaml
Smartappli 10ab995
Merge branch 'main' into cuda
Smartappli b80cc88
Merge branch 'main' into cuda
Smartappli f385942
Merge branch 'main' into cuda
Smartappli 6951db8
Merge branch 'main' into cuda
Smartappli a6b776b
Merge branch 'abetlen:main' into cuda
Smartappli 1ed20b8
Update build-and-release.yaml
Smartappli bb98fa5
Update build-wheels-metal.yaml
Smartappli 496a437
revert
Smartappli fe9a9a1
Merge branch 'main' into cuda
Smartappli 6d065af
Merge branch 'main' into cuda
abetlen 6627890
Remove cpu variants
abetlen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,8 @@ jobs: | |
id: set-matrix | ||
run: | | ||
$matrix = @{ | ||
'os' = @('ubuntu-20.04', 'windows-latest') | ||
'pyver' = @("3.10", "3.11", "3.12") | ||
'os' = @('ubuntu-latest', 'windows-latest') | ||
'pyver' = @("3.9", "3.10", "3.11", "3.12") | ||
'cuda' = @("12.1.1", "12.2.2", "12.3.2", "12.4.1") | ||
'releasetag' = @("basic") | ||
} | ||
|
@@ -50,6 +50,7 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
cache: 'pip' | ||
|
||
- name: Setup Mamba | ||
uses: conda-incubator/[email protected] | ||
|
@@ -109,15 +110,15 @@ jobs: | |
$env:VERBOSE = '1' | ||
$env:CMAKE_ARGS = '-DLLAMA_CUBLAS=on -DCMAKE_CUDA_ARCHITECTURES=all' | ||
$env:CMAKE_ARGS = "-DLLAMA_CUDA_FORCE_MMQ=ON $env:CMAKE_ARGS" | ||
if ($env:AVXVER -eq 'AVX') { | ||
Smartappli marked this conversation as resolved.
Show resolved
Hide resolved
|
||
$env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off' | ||
} | ||
if ($env:AVXVER -eq 'AVX512') { | ||
$env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX512=on' | ||
} | ||
if ($env:AVXVER -eq 'basic') { | ||
$env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off' | ||
} | ||
# if ($env:AVXVER -eq 'AVX') { | ||
$env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off' | ||
# } | ||
# if ($env:AVXVER -eq 'AVX512') { | ||
# $env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX512=on' | ||
# } | ||
# if ($env:AVXVER -eq 'basic') { | ||
# $env:CMAKE_ARGS = $env:CMAKE_ARGS + ' -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off' | ||
# } | ||
python -m build --wheel | ||
# write the build tag to the output | ||
Write-Output "CUDA_VERSION=$cudaVersion" >> $env:GITHUB_ENV | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,81 +6,60 @@ permissions: | |
contents: write | ||
|
||
jobs: | ||
define_matrix: | ||
name: Define Build Matrix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
steps: | ||
- name: Define Job Output | ||
id: set-matrix | ||
run: | | ||
$matrix = @{ | ||
'os' = @('macos-11', 'macos-12', 'macos-13') | ||
'pyver' = @('3.10', '3.11', '3.12') | ||
} | ||
|
||
$matrixOut = ConvertTo-Json $matrix -Compress | ||
Write-Output ('matrix=' + $matrixOut) >> $env:GITHUB_OUTPUT | ||
|
||
build_wheels: | ||
name: ${{ matrix.os }} Python ${{ matrix.pyver }} | ||
needs: define_matrix | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: ${{ fromJSON(needs.define_matrix.outputs.matrix) }} | ||
env: | ||
OSVER: ${{ matrix.os }} | ||
matrix: | ||
os: [macos-12, macos-13, macos-14] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
|
||
# Used to host cibuildwheel | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.pyver }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python -m pip install build wheel cmake | ||
python-version: "3.12" | ||
cache: 'pip' | ||
|
||
- name: Build Wheel | ||
- name: Install dependencies | ||
run: | | ||
XCODE15PATH="/Applications/Xcode_15.0.app/Contents/Developer" | ||
XCODE15BINPATH="${XCODE15PATH}/Toolchains/XcodeDefault.xctoolchain/usr/bin" | ||
export CMAKE_ARGS="-DLLAMA_NATIVE=off -DLLAMA_METAL=on" | ||
[[ "$OSVER" == "macos-13" ]] && export CC="${XCODE15BINPATH}/cc" && export CXX="${XCODE15BINPATH}/c++" && export MACOSX_DEPLOYMENT_TARGET="13.0" | ||
[[ "$OSVER" == "macos-12" ]] && export MACOSX_DEPLOYMENT_TARGET="12.0" | ||
[[ "$OSVER" == "macos-11" ]] && export MACOSX_DEPLOYMENT_TARGET="11.0" | ||
python -m pip install --upgrade pip | ||
python -m pip install -e .[all] | ||
|
||
export CMAKE_OSX_ARCHITECTURES="arm64" && export ARCHFLAGS="-arch arm64" | ||
VERBOSE=1 python -m build --wheel | ||
|
||
if [[ "$OSVER" == "macos-13" ]]; then | ||
export SDKROOT="${XCODE15PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk" | ||
export MACOSX_DEPLOYMENT_TARGET="14.0" | ||
VERBOSE=1 python -m build --wheel | ||
fi | ||
|
||
for file in ./dist/*.whl; do cp "$file" "${file/arm64.whl/aarch64.whl}"; done | ||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
# disable repair | ||
CIBW_REPAIR_WHEEL_COMMAND: "" | ||
CIBW_ARCHS: "arm64" | ||
CIBW_ENVIRONMENT: CMAKE_ARGS="-DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DLLAMA_METAL=on" | ||
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*" | ||
with: | ||
package-dir: . | ||
output-dir: wheelhouse2 | ||
|
||
export CMAKE_OSX_ARCHITECTURES="x86_64" && export CMAKE_ARGS="-DLLAMA_NATIVE=off -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_FMA=off -DLLAMA_F16C=off -DLLAMA_METAL=on" && export ARCHFLAGS="-arch x86_64" | ||
VERBOSE=1 python -m build --wheel | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-mac_${{ matrix.os }} | ||
path: ./wheelhouse2/*.whl | ||
|
||
if [[ "$OSVER" == "macos-13" ]]; then | ||
export SDKROOT="${XCODE15PATH}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk" | ||
export MACOSX_DEPLOYMENT_TARGET="14.0" | ||
VERBOSE=1 python -m build --wheel | ||
fi | ||
release: | ||
name: Release | ||
needs: [build_wheels] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
path: dist2 | ||
|
||
- uses: softprops/action-gh-release@v2 | ||
with: | ||
files: dist/* | ||
files: dist2/* | ||
# set release name to <tag>-metal | ||
tag_name: ${{ github.ref_name }}-metal | ||
env: | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.