-
Notifications
You must be signed in to change notification settings - Fork 13.8k
ggml : add repack testing support #16182
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
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9e38863
ggml : add CPU backend reference implementation (wip)
danbev 3a91c34
move list_cpu_variants() to be called directly
danbev 9ce53a3
ggml : add repack testing support
danbev 3d23252
ggml : add SSE2 detection for x86 backends
danbev 440abf4
try workaround for windows
danbev 49f1e76
ci : add workflow for testing CPU variants [no ci]
danbev fe21170
ggml : check src[1] does not have more than 2 dimensions
danbev 17b2e26
remove setting of buffers in init tensor [no ci]
danbev 0e9c0b7
move repack hack to test-backend-ops.cpp [no ci]
danbev 2322b1b
repack : add check for 2D src[1] in supports_op
danbev 8c3eb6c
tests : refactor handling of extra buffer types
danbev 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 |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| name: Test CPU Variants | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| operation: | ||
| description: 'Operation to test (e.g., MUL_MAT or full spec)' | ||
| required: false | ||
| default: 'MUL_MAT' | ||
| type: string | ||
| variant: | ||
| description: 'CPU variant to test (leave empty to list available variants)' | ||
| required: false | ||
| default: '' | ||
| type: string | ||
|
|
||
| jobs: | ||
| test-cpu-variant-sve: | ||
| runs-on: ubuntu-24.04-arm | ||
| steps: | ||
| - name: Clone | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y | ||
| sudo apt-get update | ||
| sudo apt-get install build-essential gcc-14 g++-14 | ||
| sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 | ||
| sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 | ||
| gcc --version | ||
|
|
||
| - name: Build with CPU reference backend | ||
| run: | | ||
| cmake -B build -S . \ | ||
| -DGGML_CPU_REF_BACKEND=ON \ | ||
| -DGGML_CPU_ALL_VARIANTS=ON \ | ||
| -DGGML_CPU_REPACK=ON \ | ||
| -DGGML_NATIVE=OFF \ | ||
| -DGGML_BACKEND_DL=ON \ | ||
| -DGGML_BLAS=OFF \ | ||
| -DLLAMA_CURL=OFF \ | ||
| -DCMAKE_BUILD_TYPE=Release | ||
|
|
||
| cmake --build build -j8 | ||
|
|
||
| - name: List available CPU variants | ||
| run: | | ||
| echo "Available CPU variants:" | ||
| ./build/bin/test-backend-ops cpu-variants --list | ||
|
|
||
| - name: Test CPU variant | ||
| if: ${{ inputs.variant != '' }} | ||
| run: | | ||
| echo "Testing variant: ${{ inputs.variant }}" | ||
| echo "Operation: ${{ inputs.operation }}" | ||
| ./build/bin/test-backend-ops cpu-variants \ | ||
| --variant ${{ inputs.variant }} \ | ||
| -o "${{ inputs.operation }}" | ||
|
|
||
| - name: Instructions | ||
| if: ${{ inputs.variant == '' }} | ||
| run: | | ||
| echo "==========================================" | ||
| echo "No variant specified - only listed available variants above" | ||
| echo "To test a specific variant, re-run this workflow with:" | ||
| echo " - variant: one of the variants listed above" | ||
| echo " - operation: your operation string (default: MUL_MAT)" | ||
| echo "==========================================" |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
GGML_SYSTEM_ARCHinstead.