-
Notifications
You must be signed in to change notification settings - Fork 33
Deeploy-GAP9 Platform #143
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
base: devel
Are you sure you want to change the base?
Changes from all commits
3d55d6a
8ae3fef
6acde80
a7ac74e
f916db8
3cd6e29
9ca4595
7e77991
294d83a
4946ed5
a08b6fd
b51e29d
6b5c2e5
3a1d877
faa6421
584729c
3e2fc87
6b55e98
ccaad61
af01a2e
e4ed675
71896e7
f88d5c5
4429a6a
40d1dec
ff05304
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| --- | ||
| name: _runner-gap9-tiled | ||
|
|
||
| "on": | ||
| workflow_call: | ||
| inputs: | ||
| runner: | ||
| required: true | ||
| type: string | ||
| docker-image: | ||
| required: true | ||
| type: string | ||
| test-name: | ||
| required: true | ||
| type: string | ||
| num-cores: | ||
| required: false | ||
| default: 8 | ||
| type: number | ||
| L1: | ||
| required: false | ||
| default: "[64000]" | ||
| type: string | ||
| default-memory-level: | ||
| required: false | ||
| default: "L2" | ||
| type: string | ||
| double-buffer: | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
| memory-allocation-strategy: | ||
| required: false | ||
| default: "MiniMalloc" | ||
| type: string | ||
| search-strategy: | ||
| required: false | ||
| default: "random-max" | ||
| type: string | ||
|
|
||
| jobs: | ||
| test-runner-gap9-tiled: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| L1: ${{ fromJSON(inputs.L1) }} | ||
| runs-on: ${{ inputs.runner }} | ||
| container: | ||
| image: ${{ inputs.docker-image }} | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Build Deeploy | ||
| shell: bash | ||
| run: | | ||
| source /app/install/gap9-sdk/.gap9-venv/bin/activate | ||
| source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true | ||
| pip install -e . || true | ||
| deactivate | ||
| - name: Setup ccache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /app/.ccache | ||
| key: ccache-ci | ||
| - name: Run Test | ||
| run: | | ||
| source /app/install/gap9-sdk/.gap9-venv/bin/activate | ||
| source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true | ||
| export GVSOC_INSTALL_DIR=/app/install/gap9-sdk/install/workstation | ||
| export GAP_RISCV_GCC_TOOLCHAIN=/app/install/gcc/gap9 | ||
| cd DeeployTest | ||
| mkdir -p /app/.ccache | ||
| export CCACHE_DIR=/app/.ccache | ||
| python testRunner_tiled_gap9.py -t Tests/${{ inputs.test-name }} --cores=${{ inputs.num-cores }} --l1 ${{ matrix.L1 }} --defaultMemLevel=${{ inputs.default-memory-level }} ${{ inputs.double-buffer && '--doublebuffer' || '' }} --memAllocStrategy=${{ inputs.memory-allocation-strategy }} --searchStrategy=${{ inputs.search-strategy }} | ||
| deactivate | ||
| shell: bash |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| --- | ||
| name: _runner-gap9 | ||
|
|
||
| "on": | ||
| workflow_call: | ||
| inputs: | ||
| runner: | ||
| required: true | ||
| type: string | ||
| docker-image: | ||
| required: true | ||
| type: string | ||
| test-names: | ||
| required: true | ||
| type: string | ||
| num-cores: | ||
| required: true | ||
| type: number | ||
|
|
||
| jobs: | ||
| test-runner-gap9: | ||
| runs-on: ${{ inputs.runner }} | ||
| container: | ||
| image: ${{ inputs.docker-image }} | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: recursive | ||
| - name: Build Deeploy | ||
| shell: bash | ||
| run: | | ||
| source /app/install/gap9-sdk/.gap9-venv/bin/activate | ||
| source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true | ||
| pip install -e . || true | ||
| deactivate | ||
| - name: Setup ccache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /app/.ccache | ||
| key: ccache-ci | ||
| - name: Run Test | ||
| run: | | ||
| testNames="${{ inputs.test-names }}" | ||
| source /app/install/gap9-sdk/.gap9-venv/bin/activate | ||
| source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true | ||
| export GVSOC_INSTALL_DIR=/app/install/gap9-sdk/install/workstation | ||
| export GAP_RISCV_GCC_TOOLCHAIN=/app/install/gcc/gap9 | ||
| cd DeeployTest | ||
| mkdir -p /app/.ccache | ||
| export CCACHE_DIR=/app/.ccache | ||
| echo "$testNames" | while IFS= read -r testName; do | ||
| if [[ -n "$testName" ]]; then | ||
| echo "Running test: $testName" | ||
| python testRunner_gap9.py -t Tests/$testName | ||
| fi | ||
| done | ||
| deactivate | ||
| shell: bash | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,4 +45,4 @@ jobs: | |
| echo "runner=self-hosted" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "runner=ubuntu-latest" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| fi | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -17,7 +17,7 @@ name: CI • Deeploy | |||||||||||||||||||
| docker_image_deeploy: | ||||||||||||||||||||
| description: "Deeploy Image to use" | ||||||||||||||||||||
| required: false | ||||||||||||||||||||
| default: "ghcr.io/pulp-platform/deeploy:devel" | ||||||||||||||||||||
| default: "ghcr.io/runwangdl/deeploy:gap9" | ||||||||||||||||||||
|
Comment on lines
17
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personal Docker registry should not be used in production CI. The default image was changed from
Given the PR's DRAFT status, this is likely a development convenience. Before merging, ensure the image is published to the official Expected change before merge- default: "ghcr.io/runwangdl/deeploy:gap9"
+ default: "ghcr.io/pulp-platform/deeploy:gap9"Or revert to devel if GAP9-specific image isn't ready: - default: "ghcr.io/runwangdl/deeploy:gap9"
+ default: "ghcr.io/pulp-platform/deeploy:devel"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||
|
|
||||||||||||||||||||
| concurrency: | ||||||||||||||||||||
| group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||||||||
|
|
@@ -235,4 +235,4 @@ jobs: | |||||||||||||||||||
| shell: bash | ||||||||||||||||||||
| run: | | ||||||||||||||||||||
| cd DeeployTest | ||||||||||||||||||||
| python testDmas.py | ||||||||||||||||||||
| python testDmas.py | ||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,207 @@ | ||
| # SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| --- | ||
| name: CI • GAP9 (Tiled) | ||
|
|
||
| "on": | ||
| push: | ||
| branches: | ||
| - "**" | ||
| tags: | ||
| - "v*.*.*" | ||
| pull_request: | ||
| workflow_dispatch: | ||
| inputs: | ||
| docker_image_deeploy: | ||
| description: "Deeploy Image to use" | ||
| required: false | ||
| default: "ghcr.io/runwangdl/deeploy:gap9" | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| select-env: | ||
| uses: ./.github/workflows/_select-env.yml | ||
| with: | ||
| docker_image_deeploy: ${{ inputs.docker_image_deeploy }} | ||
|
|
||
| gap9-kernels-tiled-singlebuffer-L2: | ||
| needs: select-env | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test-data: | ||
| - name: "testMatMul" | ||
| L1: [64000, 32000, 16000] | ||
| - name: "test2DRequantizedConv" | ||
| L1: [8000, 6000, 4000] | ||
| - name: "test2DRequantizedStriddedPaddedConv" | ||
| L1: [600] | ||
| - name: "testRequantizedDWConv" | ||
| L1: [2561] | ||
| - name: "iSoftmax" | ||
| L1: [800, 500, 300] | ||
| - name: "testConcat" | ||
| L1: [32000, 16000, 8000] | ||
| - name: "Hardswish" | ||
| L1: [750] | ||
| - name: "RQHardswish" | ||
| L1: [750] | ||
| - name: "testFloatGEMM" | ||
| L1: [8000] | ||
| - name: "testFloat2DConvolution" | ||
| L1: [1600] | ||
| - name: "testFloat2DConvolutionBias" | ||
| L1: [6600] | ||
| - name: "testFloat2DConvolutionZeroBias" | ||
| L1: [6600] | ||
| - name: "testFloat2DDWConvolution" | ||
| L1: [7200] | ||
| - name: "testFloat2DDWConvolutionBias" | ||
| L1: [7200] | ||
| - name: "testFloat2DDWConvolutionZeroBias" | ||
| L1: [7200] | ||
| - name: "testFloatLayerNorm" | ||
| L1: [2000] | ||
| - name: "testFloatMaxPool" | ||
| L1: [2000] | ||
| - name: "testFloatMatmul" | ||
| L1: [2000] | ||
| - name: "testFloatRelu" | ||
| L1: [2000] | ||
| - name: "testFloatReshapeWithSkipConnection" | ||
| L1: [1400] | ||
| - name: "testFloatSoftmax" | ||
| L1: [4000] | ||
| - name: "testFloatTranspose" | ||
| L1: [2000] | ||
| - name: "testFloatMul" | ||
| L1: [2000] | ||
| - name: "testRQGEMMwBatch" | ||
| L1: [20000] | ||
| - name: "testMatMulBatch" | ||
| L1: [20000] | ||
| uses: ./.github/workflows/_runner-gap9-tiled.yml | ||
| with: | ||
| runner: ${{ needs.select-env.outputs.runner }} | ||
| docker-image: ${{ needs.select-env.outputs.image }} | ||
| test-name: ${{ matrix.test-data.name }} | ||
| num-cores: 8 | ||
| L1: ${{ toJson(matrix.test-data.L1) }} | ||
|
|
||
| gap9-kernels-tiled-doublebuffer-L2: | ||
| needs: select-env | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test-data: | ||
| - name: "testMatMul" | ||
| L1: [64000, 32000, 16000] | ||
| - name: "test2DRequantizedConv" | ||
| L1: [8000, 6000, 5000] | ||
| - name: "testRequantizedDWConv" | ||
| L1: [5121] | ||
| - name: "iSoftmax" | ||
| L1: [1600, 1000, 600] | ||
| - name: "testConcat" | ||
| L1: [64000, 32000, 16000] | ||
| - name: "Hardswish" | ||
| L1: [750] | ||
| - name: "RQHardswish" | ||
| L1: [800] | ||
| - name: "testFloatGEMM" | ||
| L1: [8000] | ||
| - name: "testFloat2DConvolution" | ||
| L1: [2000] | ||
| - name: "testFloat2DConvolutionBias" | ||
| L1: [8800] | ||
| - name: "testFloat2DConvolutionZeroBias" | ||
| L1: [8800] | ||
| - name: "testFloat2DDWConvolution" | ||
| L1: [9800] | ||
| - name: "testFloat2DDWConvolutionBias" | ||
| L1: [10000] | ||
| - name: "testFloat2DDWConvolutionZeroBias" | ||
| L1: [9800] | ||
| - name: "testFloatLayerNorm" | ||
| L1: [2000] | ||
| - name: "testFloatMaxPool" | ||
| L1: [5000] | ||
| - name: "testFloatMatmul" | ||
| L1: [5000] | ||
| - name: "testFloatRelu" | ||
| L1: [20] | ||
| - name: "testFloatReshapeWithSkipConnection" | ||
| L1: [2600] | ||
| - name: "testFloatSoftmax" | ||
| L1: [8000] | ||
| - name: "testFloatTranspose" | ||
| L1: [2000] | ||
| - name: "testFloatMul" | ||
| L1: [2000] | ||
| uses: ./.github/workflows/_runner-gap9-tiled.yml | ||
| with: | ||
| runner: ${{ needs.select-env.outputs.runner }} | ||
| docker-image: ${{ needs.select-env.outputs.image }} | ||
| test-name: ${{ matrix.test-data.name }} | ||
| num-cores: 8 | ||
| L1: ${{ toJson(matrix.test-data.L1) }} | ||
| double-buffer: true | ||
|
|
||
| gap9-models-tiled-singlebuffer-L2: | ||
| needs: select-env | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test-data: | ||
| - name: "simpleRegression" | ||
| L1: [45000, 30000, 15000] | ||
| - name: "miniMobileNet" | ||
| L1: [60000, 12000, 6000, 3000] | ||
| - name: "miniMobileNetv2" | ||
| L1: [60000, 16000, 12000, 8000] | ||
| - name: "Attention" | ||
| L1: [60000, 10000, 5000] | ||
| - name: "MLPerf/KeywordSpotting" | ||
| L1: [64000] | ||
| - name: "MLPerf/ImageClassification" | ||
| L1: [64000] | ||
| - name: "MLPerf/AnomalyDetection" | ||
| L1: [64000] | ||
| num-cores: [8] | ||
| uses: ./.github/workflows/_runner-gap9-tiled.yml | ||
| with: | ||
| runner: ${{ needs.select-env.outputs.runner }} | ||
| docker-image: ${{ needs.select-env.outputs.image }} | ||
| test-name: ${{ matrix.test-data.name }} | ||
| num-cores: ${{ matrix.num-cores }} | ||
| L1: ${{ toJson(matrix.test-data.L1) }} | ||
|
|
||
| gap9-models-tiled-doublebuffer-L2: | ||
| needs: select-env | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| test-data: | ||
| - name: "simpleRegression" | ||
| L1: [60000, 45000, 30000] | ||
| - name: "miniMobileNet" | ||
| L1: [60000, 24000, 12000, 6000] | ||
| - name: "miniMobileNetv2" | ||
| L1: [60000, 32000, 24000, 16000] | ||
| - name: "Attention" | ||
| L1: [60000, 20000, 10000, 5000] | ||
| num-cores: [8] | ||
| double-buffer: [true] | ||
| uses: ./.github/workflows/_runner-gap9-tiled.yml | ||
| with: | ||
| runner: ${{ needs.select-env.outputs.runner }} | ||
| docker-image: ${{ needs.select-env.outputs.image }} | ||
| test-name: ${{ matrix.test-data.name }} | ||
| num-cores: ${{ matrix.num-cores }} | ||
| L1: ${{ toJson(matrix.test-data.L1) }} | ||
| double-buffer: ${{ matrix.double-buffer }} |
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.
Don’t mask environment/build failures with
|| true.pip install -e . || true(andsource ... || true) can turn real breakages into false-green CI. Prefer failing fast unless you have an explicit fallback path.Proposed fix
- name: Build Deeploy shell: bash run: | source /app/install/gap9-sdk/.gap9-venv/bin/activate - source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true - pip install -e . || true + source /app/install/gap9-sdk/configs/gap9_evk_audio.sh + pip install -e . deactivate🤖 Prompt for AI Agents