Add -noavx2 portable builds

This commit is contained in:
oobabooga 2025-04-25 09:07:14 -07:00
parent 98f4c694b9
commit 0dd71e78c9
3 changed files with 20 additions and 8 deletions

View file

@ -59,7 +59,7 @@ jobs:
$matrix = @{ $matrix = @{
'os' = @('ubuntu-22.04', 'windows-2019') 'os' = @('ubuntu-22.04', 'windows-2019')
'pyver' = @("3.11") 'pyver' = @("3.11")
'avx' = @("AVX2") 'avx' = @("AVX2", "AVX")
'cuda' = @("11.7", "12.4") 'cuda' = @("11.7", "12.4")
} }
@ -161,7 +161,11 @@ jobs:
# 6. Create ZIP file # 6. Create ZIP file
cd .. cd ..
VERSION_CLEAN="${VERSION#v}" VERSION_CLEAN="${VERSION#v}"
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}.zip" if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}.zip"
else
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-cuda${CUDA_VERSION}-noavx2.zip"
fi
echo "Creating archive: $ZIP_NAME" echo "Creating archive: $ZIP_NAME"
if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "$RUNNER_OS" == "Windows" ]]; then

View file

@ -59,7 +59,7 @@ jobs:
$matrix = @{ $matrix = @{
'os' = @('ubuntu-22.04', 'windows-2019') 'os' = @('ubuntu-22.04', 'windows-2019')
'pyver' = @("3.11") 'pyver' = @("3.11")
'avx' = @("AVX2") 'avx' = @("AVX2", "AVX")
} }
if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})} if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})}
@ -146,7 +146,11 @@ jobs:
# 6. Create ZIP file # 6. Create ZIP file
cd .. cd ..
VERSION_CLEAN="${VERSION#v}" VERSION_CLEAN="${VERSION#v}"
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip" if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan.zip"
else
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-vulkan-noavx2.zip"
fi
echo "Creating archive: $ZIP_NAME" echo "Creating archive: $ZIP_NAME"
if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "$RUNNER_OS" == "Windows" ]]; then

View file

@ -15,7 +15,7 @@ on:
type: string type: string
exclude: exclude:
description: 'Exclude build configurations: key1-1:item1-1,key1-2:item1-2;key2-1:item2-1,key2-2:item2-2' description: 'Exclude build configurations: key1-1:item1-1,key1-2:item1-2;key2-1:item2-1,key2-2:item2-2'
default: 'None' default: 'os:macos-13,avx:AVX;os:macos-14,avx:AVX'
required: false required: false
type: string type: string
workflow_call: workflow_call:
@ -32,7 +32,7 @@ on:
type: string type: string
exclude: exclude:
description: 'Exclude build configurations: key1-1:item1-1,key1-2:item1-2;key2-1:item2-1,key2-2:item2-2' description: 'Exclude build configurations: key1-1:item1-1,key1-2:item1-2;key2-1:item2-1,key2-2:item2-2'
default: 'None' default: 'os:macos-13,avx:AVX;os:macos-14,avx:AVX'
required: false required: false
type: string type: string
@ -59,7 +59,7 @@ jobs:
$matrix = @{ $matrix = @{
'os' = @('ubuntu-22.04', 'windows-2019', 'macos-13', 'macos-14') 'os' = @('ubuntu-22.04', 'windows-2019', 'macos-13', 'macos-14')
'pyver' = @("3.11") 'pyver' = @("3.11")
'avx' = @("AVX2") 'avx' = @("AVX2", "AVX")
} }
if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})} if ($env:CONFIGIN -ne 'Default') {$env:CONFIGIN.split(';').foreach({$matrix[$_.split(':')[0]] = $_.split(':')[1].split(',')})}
@ -171,7 +171,11 @@ jobs:
# 5. Create ZIP file # 5. Create ZIP file
cd .. cd ..
VERSION_CLEAN="${VERSION#v}" VERSION_CLEAN="${VERSION#v}"
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip" if [[ "$AVX_SUPPORT" == "AVX2" ]]; then
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}.zip"
else
ZIP_NAME="textgen-portable-${VERSION_CLEAN}-${PLATFORM}-noavx2.zip"
fi
echo "Creating archive: $ZIP_NAME" echo "Creating archive: $ZIP_NAME"
if [[ "$RUNNER_OS" == "Windows" ]]; then if [[ "$RUNNER_OS" == "Windows" ]]; then