Skip to content
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

OPEN: Snitch Cluster Tiling Support #22

Open
wants to merge 9 commits into
base: devel
Choose a base branch
from

Conversation

tahaelbayad
Copy link
Contributor

@tahaelbayad tahaelbayad commented Dec 13, 2024

This PR mirrors a PR from the GitLab repository, extending the support for snitch_cluster platform by adding support for single-buffered tiling and more operators, such as:

  • RequantizedGEMM
  • RequantizedAdd
  • Add
  • iSoftmax
  • iNoNorm

Added

  • Support for single-buffered tiling from L2.
  • Parsers, Templates, TypeCheckers, Layers, and TCF for the newly supported operators.
  • A code transformation pass to filter DMA cores or compute cores for an ExecutionBlock.
  • A code transformation pass to profile an ExecutionBlock.
  • Test for single kernels, both with and without tiling.
  • Adds the --debug flag to cargo install when installing Banshee to get the possibility of enabling the debug prints.
  • New tests for the snitch_cluster platform.
  • Add macros to main.c to disable printing and testing (convenient when running RTL simulations).

Changed

  • Add the possibility of changing the simulator when using the snitch-tiled test runner.

Fixed

  • Add the possibility of changing the simulator when using the snitch-tiled test runner.

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.
  4. The CHANGELOG.md file has been updated.

@Victor-Jung Victor-Jung changed the title DRAFT: Snitch Cluster support DRAFT: Snitch Cluster Tiling Support Dec 13, 2024
@tahaelbayad tahaelbayad marked this pull request as ready for review December 13, 2024 10:38
@tahaelbayad tahaelbayad changed the title DRAFT: Snitch Cluster Tiling Support OPEN: Snitch Cluster Tiling Support Dec 13, 2024
Copy link
Member

@Victor-Jung Victor-Jung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First round of comments, I haven't had time to give a pass on everything yet.

tags: ghcr.io/pulp-platform/deeploy:main
tags: ghcr.io/tahaelbayad/deeploy:main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing the tag if you don't modify the docker build process?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I did that before the previous PR was merged but forgot to update it afterwards. I updated it here 45cd6ec.

image: ghcr.io/pulp-platform/deeploy:main
image: ghcr.io/tahaelbayad/deeploy:main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as before, no need to change the tag if you don't change anything in the Docker

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here 45cd6ec

testRQGEMMTransB

snitch-kernels-tiled-singlebuffer-L2:
uses: ./.github/workflows/TestRunnerTiledSnitch.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This TestRunner should be renamed TestRunnerTiledSnitchSequential.

In the CI flow you can spawn parallel jobs for each test or execute many tests sequentially in the same job. Which one to use (parallel or sequential) really depends on how long the test takes. Each time you spawn a job, a VM starts on the GitHub servers, then it loads the Deeploy docker, and finally starts the test. Loading the docker takes ~50sec and each time you spawn a new job you have to pay this price. Now, if your test takes 5sec (which is the case for small networks) it's better to spawn one job and run all the test sequentially.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the name to TestRunnerTiledSnitchSequential and adapted it so that number of cores and default memory level are input variables here 0d4baed. Plus, I made the same adjustment for the --simulator flag, let me know if you find this useful.

L1_values=$(echo "$test" | jq -r '.L1[]')
for L1_value in $L1_values; do
echo "Running test: $testName with L1: $L1_value"
python testRunner_tiled_snitch.py -t Tests/$testName --cores=9 --simulator=banshee --l1 $L1_value --defaultMemLevel=L2 --toolchain_install_dir /app/install/riscv-llvm/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the number of cores to an input variable of this reusable workflow, just like it's done in TestRunnerTiledSiracusaSequential, give it a default value of 9 too. Maybe in the future we want to have some test running on 1 core.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for the default memory level

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned before you can check it here 0d4baed

.gitmodules Outdated
Comment on lines 10 to 13
path = TargetLibraries/Snitch/third_party/pulp-nn-mixed
url = https://github.com/Victor-Jung/pulp-nn-mixed.git
branch = deeploySnitchTarget
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is necessary anymore. We just have one kernel from this library (requantized add), so let's move this kernel in the Snitch library (TargetLibraries/Snitch/kernel) instead of adding a complete submodule just for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can check the changes here 6fe7c42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants