mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-27 08:21:30 +00:00
ggml: WebGPU backend host improvements and style fixing (#14978)
* Add parameter buffer pool, batching of submissions, refactor command building/submission * Add header for linux builds * Free staged parameter buffers at once * Format with clang-format * Fix thread-safe implementation * Use device implicit synchronization * Update workflow to use custom release * Remove testing branch workflow
This commit is contained in:
64
.github/workflows/build.yml
vendored
64
.github/workflows/build.yml
vendored
@@ -159,31 +159,15 @@ jobs:
|
|||||||
- name: Dawn Dependency
|
- name: Dawn Dependency
|
||||||
id: dawn-depends
|
id: dawn-depends
|
||||||
run: |
|
run: |
|
||||||
ARTIFACTS_JSON=$(curl -s -L \
|
DAWN_VERSION="v1.0.0"
|
||||||
-H "Accept: application/vnd.github+json" \
|
DAWN_OWNER="reeselevine"
|
||||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
DAWN_REPO="dawn"
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-macos-latest-Release.tar.gz"
|
||||||
"https://api.github.com/repos/google/dawn/actions/artifacts")
|
echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
|
||||||
echo "Finding latest macos-latest-Release artifact..."
|
curl -L -o artifact.tar.gz \
|
||||||
DOWNLOAD_URL=$(echo "$ARTIFACTS_JSON" | jq -r '.artifacts
|
"https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
|
||||||
| sort_by(.created_at)
|
|
||||||
| reverse
|
|
||||||
| map(select(.name | test("macos-latest-Release$")))
|
|
||||||
| .[0].archive_download_url')
|
|
||||||
if [ "$DOWNLOAD_URL" = "null" ] || [ -z "$DOWNLOAD_URL" ]; then
|
|
||||||
echo "No suitable Dawn artifact found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Downloading from: $DOWNLOAD_URL"
|
|
||||||
curl -L \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
-o artifact.zip "$DOWNLOAD_URL"
|
|
||||||
unzip artifact.zip
|
|
||||||
mkdir dawn
|
mkdir dawn
|
||||||
tar_file=$(find . -name '*.tar.gz' | head -n 1)
|
tar -xvf artifact.tar.gz -C dawn --strip-components=1
|
||||||
echo "Extracting: $tar_file"
|
|
||||||
tar -xvf "$tar_file" -C dawn --strip-components=1
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: cmake_build
|
id: cmake_build
|
||||||
@@ -433,31 +417,15 @@ jobs:
|
|||||||
id: dawn-depends
|
id: dawn-depends
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev libxi-dev
|
sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev libxi-dev
|
||||||
ARTIFACTS_JSON=$(curl -s -L \
|
DAWN_VERSION="v1.0.0"
|
||||||
-H "Accept: application/vnd.github+json" \
|
DAWN_OWNER="reeselevine"
|
||||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
DAWN_REPO="dawn"
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-ubuntu-latest-Release.tar.gz"
|
||||||
"https://api.github.com/repos/google/dawn/actions/artifacts")
|
echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
|
||||||
echo "Finding latest ubuntu-latest-Release artifact..."
|
curl -L -o artifact.tar.gz \
|
||||||
DOWNLOAD_URL=$(echo "$ARTIFACTS_JSON" | jq -r '.artifacts
|
"https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
|
||||||
| sort_by(.created_at)
|
|
||||||
| reverse
|
|
||||||
| map(select(.name | test("ubuntu-latest-Release$")))
|
|
||||||
| .[0].archive_download_url')
|
|
||||||
if [ "$DOWNLOAD_URL" = "null" ] || [ -z "$DOWNLOAD_URL" ]; then
|
|
||||||
echo "No suitable Dawn artifact found!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Downloading from: $DOWNLOAD_URL"
|
|
||||||
curl -L \
|
|
||||||
-H "Accept: application/vnd.github+json" \
|
|
||||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
|
||||||
-o artifact.zip "$DOWNLOAD_URL"
|
|
||||||
unzip artifact.zip
|
|
||||||
mkdir dawn
|
mkdir dawn
|
||||||
tar_file=$(find . -name '*.tar.gz' | head -n 1)
|
tar -xvf artifact.tar.gz -C dawn --strip-components=1
|
||||||
echo "Extracting: $tar_file"
|
|
||||||
tar -xvf "$tar_file" -C dawn --strip-components=1
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: cmake_build
|
id: cmake_build
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user