Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cb9d3f6
Update Whisper.cpp and add Linux acceleration (source builds only)
Tabby May 27, 2024
602c1b0
Test behaviour with combinations of multiple backends
Tabby Oct 20, 2025
e583c54
Use found dependencies to decide which acceleration features to enable
Tabby Oct 28, 2025
10f004f
Add GPU device selection option in plugin settings
Tabby Oct 29, 2025
b8594c5
Add OpenCL support for Linux source build
Tabby Oct 29, 2025
2725715
Comment out seemingly unused DISABLE_ONNX_RUNTIME_GPU option
Tabby Oct 31, 2025
4f7a918
Update prebuilt Whisper deps to 0.0.9 (Whisper 1.8.2) and refactor cm…
Tabby Oct 31, 2025
732b6ff
Handle new GGML IGPU device type
Tabby Nov 1, 2025
73736ec
Bump whisper deps to 0.0.9-1 to fix hipblas
Tabby Nov 2, 2025
2b56d6f
Try to avoid running apt in CI when packages are cached
Tabby Nov 2, 2025
bf4a120
Add option to enable/disable flash attention
Tabby Nov 2, 2025
562c2fb
Install Vulkan SDK properly for CI build and try adding OpenCL and hi…
Tabby Nov 2, 2025
52f3538
Build with shared libs on linux and allow use of dynamic backends
Tabby Nov 3, 2025
90be7f3
Update deps to 0.0.10 (runtime module linking/importing is likely bro…
Tabby Nov 5, 2025
25feffe
Update deps to 0.0.10-2; try to fix linking & other platform specific…
Tabby Nov 6, 2025
7f5593f
Bump version number to 0.5.0
Tabby Nov 6, 2025
98c9718
Fix Ubuntu packaging
Tabby Nov 6, 2025
e96a1a0
Fix dynamic linking on MacOS
Tabby Nov 7, 2025
6e04fb6
Update README
Tabby Nov 7, 2025
323b6b1
Cleanup CMake files a bit and make prebuilt build on Linux the defaul…
Tabby Nov 7, 2025
2bdc592
Fix Linux full source build
Tabby Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/build-plugin/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
acceleration:
description: 'Enable acceleration'
required: false
default: 'cpu'
default: 'generic'
codesign:
description: 'Enable codesigning (macOS only)'
required: false
Expand Down Expand Up @@ -59,6 +59,8 @@ runs:
if: runner.os == 'Linux'
shell: zsh --no-rcs --errexit --pipefail {0}
working-directory: ${{ inputs.workingDirectory }}
env:
ACCELERATION: ${{ inputs.acceleration }}
run: |
: Run Ubuntu Build

Expand Down
4 changes: 3 additions & 1 deletion .github/scripts/.Aptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ package 'libicu-dev'
package 'libopenblas-dev'
package 'libopenblas-openmp-dev'
package 'libsimde-dev'
package 'libvulkan-dev'
package 'ninja-build', bin: 'ninja'
package 'nvidia-opencl-dev'
package 'ocl-icd-opencl-dev'
package 'opencl-headers'
package 'pkg-config'
11 changes: 8 additions & 3 deletions .github/scripts/.build.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ build() {
linux-aarch64
)
local target
local config='RelWithDebInfo'
if [[ "${+ACCELERATION}" == "amd" ]]
then
local config='Release'
else
local config='RelWithDebInfo'
fi
local -r -a _valid_configs=(Debug RelWithDebInfo Release MinSizeRel)
local -i codesign=0

Expand Down Expand Up @@ -184,7 +189,7 @@ ${_usage_host:-}"
setup_ccache
}

if [[ ${host_os} == linux ]] {
if [[ ${host_os} == linux && ("$(lsb_release -i)" == "Distributor ID: Ubuntu") ]] {
autoload -Uz setup_linux && setup_linux
}

Expand Down Expand Up @@ -230,7 +235,7 @@ ${_usage_host:-}"
-DCODESIGN_IDENTITY=${CODESIGN_IDENT:--}
)

cmake_build_args+=(--preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=YES)
cmake_build_args+=(--verbose --preset ${_preset} --parallel --config ${config} -- ONLY_ACTIVE_ARCH=YES)
# check the MACOS_ARCH env var to determine the build architecture
if [[ -n ${MACOS_ARCH} ]] {
cmake_build_args+=(-arch ${MACOS_ARCH})
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/.package.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ ${_usage_host:-}"
popd
} else {
log_group "Archiving ${product_name}..."
local output_name="${product_name}-${product_version}-${target##*-}-linux-gnu"
local output_name="${product_name}-${product_version}-${target##*-}-${+ACCELERATION}-linux-gnu"
local _tarflags='cJf'
if (( _loglevel > 1 || ${+CI} )) _tarflags="v${_tarflags}"

Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/Package-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ param(
[string] $Target = 'x64',
[ValidateSet('Debug', 'RelWithDebInfo', 'Release', 'MinSizeRel')]
[string] $Configuration = 'RelWithDebInfo',
[ValidateSet('cpu', 'hipblas', 'vulkan', 'cuda')]
[string] $Acceleration = 'cpu',
[ValidateSet('generic', 'nvidia', 'amd')]
[string] $Acceleration = 'generic',
[switch] $BuildInstaller,
[switch] $SkipDeps
)
Expand Down
51 changes: 25 additions & 26 deletions .github/scripts/utils.zsh/check_linux
Original file line number Diff line number Diff line change
Expand Up @@ -18,43 +18,42 @@ if [[ -f /etc/os_release ]] {

log_debug 'Checking for apt-get...'
if (( ! ${+commands[apt-get]} )) {
log_error 'No apt-get command found. Please install apt'
return 2
log_warning 'No apt-get command found. Please ensure all dependencies are correctly installed'
} else {
log_debug "Apt-get located at ${commands[apt-get]}"
}

local -a dependencies=("${(fA)$(<${SCRIPT_HOME}/.Aptfile)}")
local -a install_list
local binary
local -a dependencies=("${(fA)$(<${SCRIPT_HOME}/.Aptfile)}")
local -a install_list
local binary

sudo apt-get update -qq
sudo apt-get update -qq

for dependency (${dependencies}) {
local -a tokens=(${=dependency//(,|:|\')/})
for dependency (${dependencies}) {
local -a tokens=(${=dependency//(,|:|\')/})

if [[ ! ${tokens[1]} == 'package' ]] continue
if [[ ! ${tokens[1]} == 'package' ]] continue

if [[ ${#tokens} -gt 2 && ${tokens[3]} == 'bin' ]] {
binary=${tokens[4]}
} else {
binary=${tokens[2]}
}
if [[ ${#tokens} -gt 2 && ${tokens[3]} == 'bin' ]] {
binary=${tokens[4]}
} else {
binary=${tokens[2]}
}

if (( ! ${+commands[${binary}]} )) install_list+=(${tokens[2]})
}
if (( ! ${+commands[${binary}]} )) install_list+=(${tokens[2]})
}

log_debug "List of dependencies to install: ${install_list}"
if (( ${#install_list} )) {
if (( ! ${+CI} )) log_warning 'Dependency installation via apt may require elevated privileges'
log_debug "List of dependencies to install: ${install_list}"
if (( ${#install_list} )) {
if (( ! ${+CI} )) log_warning 'Dependency installation via apt may require elevated privileges'

local -a apt_args=(
${CI:+-y}
--no-install-recommends
)
if (( _loglevel == 0 )) apt_args+=(--quiet)
local -a apt_args=(
${CI:+-y}
--no-install-recommends
)
if (( _loglevel == 0 )) apt_args+=(--quiet)

sudo apt-get ${apt_args} install ${install_list}
sudo apt-get ${apt_args} install ${install_list}
}
}

rehash
Expand Down
78 changes: 69 additions & 9 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,42 @@ jobs:
name: Build for Ubuntu 🐧
runs-on: ubuntu-22.04
needs: check-event
strategy:
matrix:
acceleration: [generic, nvidia, amd]
defaults:
run:
shell: bash
env:
CI: 1
steps:
- name: Free Disk Space (Ubuntu)
if: ${{ matrix.acceleration == 'amd' || matrix.acceleration == 'nvidia' }}
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# Needs to be false to prevent running out of memory
swap-storage: false
# large-packages takes a long time so don't remove them unless we need to
large-packages: false

android: true
dotnet: true
haskell: true
docker-images: true

- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: "Setup additional apt repos, keys and pre-requisites"
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update

- uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
Expand All @@ -218,17 +246,25 @@ jobs:
libcurl4-openssl-dev
libicu-dev
libgles2-mesa-dev
libopenblas0
libopenblas0-openmp
libopenblas0-pthread
libopenblas-dev
libopenblas-openmp-dev
libqt6svg6-dev
libsimde-dev
libvulkan-dev
nvidia-opencl-dev
obs-studio
ocl-icd-opencl-dev
pkg-config
python3-setuptools
python3-wheel
qt6-base-dev
qt6-base-private-dev
vulkan-sdk
add-repository: ppa:obsproject/obs-studio
version: 1.0
execute_install_scripts: true

- name: Set Up Environment 🔧
id: setup
Expand All @@ -244,6 +280,29 @@ jobs:

- uses: actions-rust-lang/setup-rust-toolchain@v1

# CUDA toolkit needed for linking against so it can be found when looking up package dependencies
- name: "Install CUDA toolkit 12.8"
if: ${{ matrix.acceleration == 'nvidia' }}
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update
sudo apt -y install cuda-12-8
export PATH=/usr/local/cuda-12.8/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

# hip SDK needed for linking against so it can be found when looking up package dependencies
- name: "Install AMD hip SDK v6.4.2"
if: ${{ matrix.acceleration == 'amd' }}
run: |
wget https://repo.radeon.com/amdgpu-install/6.4.2/ubuntu/jammy/amdgpu-install_6.4.60402-1_all.deb
sudo apt install ./amdgpu-install_6.4.60402-1_all.deb
sudo apt update
sudo apt install python3-setuptools python3-wheel
sudo usermod -a -G render,video $LOGNAME # Add the current user to the render and video groups
sudo apt install rocm
sudo apt update && sudo apt install hipblas

- uses: actions/cache@v4
id: ccache-cache
with:
Expand All @@ -260,6 +319,7 @@ jobs:
with:
target: x86_64
config: ${{ needs.check-event.outputs.config }}
acceleration: ${{ matrix.acceleration }}

- name: Package Plugin 📀
uses: ./.github/actions/package-plugin
Expand All @@ -271,29 +331,29 @@ jobs:
- name: Upload Source Tarball 🗜️
uses: actions/upload-artifact@v4
with:
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-source.*
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-sources-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-source.*

- name: Upload Artifacts 📡
uses: actions/upload-artifact@v4
with:
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-x86_64*.*
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-x86_64*.*

- name: Upload debug symbol artifacts 🪲
uses: actions/upload-artifact@v4
if: ${{ fromJSON(needs.check-event.outputs.package) }}
if: ${{ fromJSON(needs.check-event.outputs.package) && (matrix.acceleration != 'amd') }}
with:
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-x86_64*-dbgsym.ddeb
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-ubuntu-22.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-${{ matrix.acceleration }}-x86_64*-dbgsym.ddeb

windows-build:
name: Build for Windows 🪟
runs-on: windows-2022
needs: check-event
strategy:
matrix:
acceleration: [cpu, cuda, vulkan, hipblas]
acceleration: [generic, nvidia, amd]
defaults:
run:
shell: pwsh
Expand Down
Loading
Loading