-
Notifications
You must be signed in to change notification settings - Fork 8
sw: Add more complex Snitch application tests #79
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
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
2921036
sw: Add GEMM tests and start AXI dump logic in memory tile
Lore0599 c4c88a8
sw: Add flow for applications and adapt GEMM with mcast support
Lore0599 18f57e0
sw: Remove legacy GEMM scripts
colluca d0116ee
sw: Test GEMM parallelized over K
colluca 94d79a1
sw: Streamline Snitch app integration
colluca 31c66b2
target: Add Make target for Snitch app verification
colluca a2bd17e
gemm_picobello: Fix regression on parallelize_k config
colluca b048875
sw: Rename Picobello GEMM to support both GEMM versions
colluca ffa7c3b
sw: Add FlashAttention kernel
colluca e268149
sw: Fix Snitch integration
colluca de81188
sw: Add `fused_concat_linear` app
colluca 5df282c
sw: Separate Snitch HAL build and source directories
colluca 277494c
sw: Add MHA kernel
colluca 1eaa72f
sw: Shrink FusedConcatLinear to only 2 clusters
colluca f17a3ca
sw: Start performance evaluation GEMM with mcast
Lore0599 bb2b43a
ci: Add Snitch apps
colluca 30c117b
sw: Change GEMM configuration
colluca f7a16dc
bender: Bump snitch_cluster
colluca 31fb9ec
sw: Use optimized GEMM in FusedConcatLinear
colluca 5281efd
Start gemm2d optimization for NoC
Lore0599 2e7c293
sw: Optimize gemm2d for NoC architecture
Lore0599 12bdd96
sw: Initial Picobello NoC runtime
Lore0599 39c03d3
bender: Bump common_cells to remove false unstable data assertion errors
colluca 7cc24e0
bender: Bump snitch_cluster to include sequencer bug fix
colluca 2aa5ff5
sw: Align NoC API with systemRDL
Lore0599 62e288a
requirements.txt: Bump `peakrdl-rawheader`
colluca 5fad5d8
Final runtime improvements
colluca e4abf0a
Fix `slink_32b_elf_preload`
colluca 0a87358
Bump pd in CI
colluca cee0d5c
Exclude non-synthesizable code on synthesis
colluca 5fdea71
Move new tb tasks to tb_picobello_tasks
colluca 55aa6b7
Use new tb tasks in pd tb
colluca b7d3472
bender: Bump snitch_cluster (no hw changes)
colluca 6485ded
Improve picobello runtime fumnctions naming
Lore0599 bc7d452
Bump PD repo
colluca 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Copyright 2025 ETH Zurich and University of Bologna. | ||
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Luca Colagrande <[email protected]> | ||
|
|
||
| APP := axpy | ||
| $(APP)_BUILD_DIR ?= $(PB_SNITCH_SW_DIR)/apps/$(APP)/build | ||
| $(APP)_DATA_CFG := $(PB_SNITCH_SW_DIR)/apps/$(APP)/data/params.json | ||
| SRC_DIR := $(SN_ROOT)/sw/blas/$(APP)/src | ||
| SRCS := $(SRC_DIR)/main.c | ||
| $(APP)_INCDIRS := $(SN_ROOT)/sw/blas | ||
|
|
||
| include $(SN_ROOT)/sw/apps/common.mk | ||
| include $(SN_ROOT)/target/snitch_cluster/sw/apps/common.mk |
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,9 @@ | ||
| // Copyright 2023 ETH Zurich and University of Bologna. | ||
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| { | ||
| "n_tiles": 5, | ||
| "n": 2560, | ||
| "funcptr": "axpy_opt" | ||
| } |
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,15 @@ | ||
| # Copyright 2025 ETH Zurich and University of Bologna. | ||
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Luca Colagrande <[email protected]> | ||
|
|
||
| APP := fused_concat_linear | ||
| $(APP)_BUILD_DIR ?= $(PB_SNITCH_SW_DIR)/apps/$(APP)/build | ||
| $(APP)_DATA_CFG := $(PB_SNITCH_SW_DIR)/apps/$(APP)/data/params.json | ||
| SRC_DIR := $(SN_ROOT)/sw/dnn/$(APP)/src | ||
| SRCS := $(SRC_DIR)/main.c | ||
| $(APP)_INCDIRS := $(SN_ROOT)/sw/dnn/src $(SN_ROOT)/sw/blas | ||
|
|
||
| include $(SN_ROOT)/sw/apps/common.mk | ||
| include $(SN_ROOT)/target/snitch_cluster/sw/apps/common.mk |
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,11 @@ | ||
| // Copyright 2023 ETH Zurich and University of Bologna. | ||
| // Solderpad Hardware License, Version 0.51, see LICENSE for details. | ||
| // SPDX-License-Identifier: SHL-0.51 | ||
|
|
||
| { | ||
| num_inputs: 2, | ||
| input_shape: [16, 16], | ||
| output_shape: [16, 16], | ||
| dtype: "FP64", | ||
| gemm_implementation: "gemm_fp64_opt" | ||
| } |
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,15 @@ | ||
| # Copyright 2025 ETH Zurich and University of Bologna. | ||
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Luca Colagrande <[email protected]> | ||
|
|
||
| APP := gemm | ||
| $(APP)_BUILD_DIR ?= $(PB_SNITCH_SW_DIR)/apps/$(APP)/build | ||
| $(APP)_DATA_CFG := $(PB_SNITCH_SW_DIR)/apps/$(APP)/data/params.json | ||
| SRC_DIR := $(SN_ROOT)/sw/blas/$(APP)/src | ||
| SRCS := $(SRC_DIR)/main.c | ||
| $(APP)_INCDIRS := $(SN_ROOT)/sw/blas | ||
|
|
||
| include $(SN_ROOT)/sw/apps/common.mk | ||
| include $(SN_ROOT)/target/snitch_cluster/sw/apps/common.mk |
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,25 @@ | ||
| // Copyright 2024 ETH Zurich and University of Bologna. | ||
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| { | ||
| setup_ssr: 1, | ||
| parallelize_m: 1, | ||
| parallelize_k: 0, | ||
| m_tiles: 64, // number of tiles in M dimension | ||
| n_tiles: 1, // number of tiles in N dimension | ||
| k_tiles: 1, // number of tiles in K dimension | ||
| load_a: 1, | ||
| load_b: 1, | ||
| load_c: 1, | ||
| double_buffer: 1, | ||
| partition_banks: 0, | ||
| transa: false, | ||
| transb: false, // must be true for SIMD | ||
| m: 2048, | ||
| n: 16, | ||
| k: 16, | ||
| alpha: 1, | ||
| beta: 0, | ||
| gemm_fp: "gemm_fp64_opt" | ||
| } |
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,17 @@ | ||
| # Copyright 2025 ETH Zurich and University of Bologna. | ||
| # Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Lorenzo Leone <[email protected]> | ||
|
|
||
| APP := gemm_2d | ||
| $(APP)_BUILD_DIR ?= $(PB_SNITCH_SW_DIR)/apps/$(APP)/build | ||
| SRC_DIR := $(PB_SNITCH_SW_DIR)/apps/$(APP)/src | ||
| SRCS := $(SRC_DIR)/gemm_2d.c | ||
| $(APP)_INCDIRS := $(SN_ROOT)/sw/blas $(SN_ROOT)/sw/blas/gemm/src | ||
|
|
||
| # Refer to Snitch scripts | ||
| $(APP)_SCRIPT_DIR := $(SN_ROOT)/sw/blas/gemm/scripts | ||
|
|
||
| include $(SN_ROOT)/sw/apps/common.mk | ||
| include $(SN_ROOT)/target/snitch_cluster/sw/apps/common.mk |
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,25 @@ | ||
| // Copyright 2024 ETH Zurich and University of Bologna. | ||
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| { | ||
| setup_ssr: 1, | ||
| parallelize_m: 1, | ||
| parallelize_k: 0, | ||
| m_tiles: 16, // number of tiles in M dimension | ||
| n_tiles: 4, // number of tiles in N dimension | ||
| k_tiles: 1, // number of tiles in K dimension | ||
| load_a: 1, | ||
| load_b: 1, | ||
| load_c: 1, | ||
| double_buffer: 1, | ||
| partition_banks: 0, | ||
| transa: false, | ||
| transb: false, // must be true for SIMD | ||
| m: 128, | ||
| n: 32, | ||
| k: 16, | ||
| alpha: 1, | ||
| beta: 0, | ||
| gemm_fp: "gemm_fp64_opt" | ||
| } |
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,30 @@ | ||
| [ | ||
| <% N_TILES = 4 %> | ||
|
|
||
| % for cluster in range(0,16): | ||
| // Compute cores | ||
| % for j in range(0, 8): | ||
| { | ||
| "thread": "${f'hart_{cluster * 9 + j + 1}'}", | ||
| "roi": [ | ||
| % for i in range(0, N_TILES): | ||
| {"idx": ${2 * i + 1}, "label": "${f'tile_{i}'}"}, | ||
| % endfor | ||
| ] | ||
| }, | ||
| % endfor | ||
|
|
||
| // DMA core | ||
| { | ||
| "thread": "${f'hart_{cluster * 9 + 8 + 1}'}", | ||
| "roi": [ | ||
| {"idx": 1, "label": "${f'tile_in_0'}"}, | ||
| % for i in range(0, N_TILES - 1): | ||
| {"idx": ${4*i + 3}, "label": "${f'tile_in_{i+1}'}"}, | ||
| {"idx": ${4*i + 5}, "label": "${f'tile_out_{i}'}"}, | ||
| % endfor | ||
| {"idx": ${N_TILES * 4 - 1}, "label": "${f'tile_out_{N_TILES-1}'}"}, | ||
| ] | ||
| }, | ||
| % endfor | ||
| ] |
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.
Uh oh!
There was an error while loading. Please reload this page.