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

Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform for L2 #35

Merged
merged 4 commits into from
Feb 17, 2025

Conversation

runwangdl
Copy link
Contributor

@runwangdl runwangdl commented Feb 10, 2025

Description

This update improves CCT's kernel tiling support and resolves multiple operator issues on the Siracusa platform. The new kernel templates for convolution and max-pooling enhance padding integration while adopting an HWC layout. Additionally, key constraints for tiling have been introduced, fixing several execution issues in GEMM, MatMul, and float-based computations. The layers has also been refined to handle bias broadcasting correctly, ensuring accurate output shape inference.

Added

  1. Float Bindings, Tilers for Pulp Target

    • Introduced tiling support for all float operators on Pulp Target(including float add, gemm, Matmul, Conv, Maxpool, Layernorm, Gelu, Gather).
  2. Float Convolution, MaxPool Parser, Template, Kernel

    • Implemented kernel and template different from the generic version.
    • Designed to integrate with padding.
    • C kernel with HWC layout.
  3. Tiling Constraints

    • Added tiling constraints for conv gather and layernorm and exisitng constraints for other kernels.

Fixed

  1. CycleMeasure Pass for Siracusa Untiling Profilling

  2. GEMM Tiling Constraints Issue

    • Fixed transA and `transB' not supported.
  3. MatMul Multi-Dimensional Input Issue

    • Improved Matmul handling of multi-dimensional input.
  4. Add Layer for Broadcasted Bias

  • Fixed add layer computeshape being compatible with broadcasted bias
  1. Code Generation Float32 Issue
    • Resolved an issue where concatenation of float32 with f caused inf errors.

Changed

  1. Regenerated ONNX for CCT
    • Adjusted bias handling to prevent incorrect output shape inference when broadcasting is required.
    • Modified bias dimensions for add and gemm to avoid unnecessary broadcasting.

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.

@runwangdl runwangdl changed the title [Draft] Add Tiling Support to All CCT Kernels and Fix CCT Operators Derivation on Siracusa Platform [Draft] Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform Feb 10, 2025
@runwangdl runwangdl force-pushed the PULPCCT branch 9 times, most recently from 740cf47 to cd2ee51 Compare February 12, 2025 23:17
@runwangdl runwangdl marked this pull request as ready for review February 12, 2025 23:56
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.

Hi Run, great PR addressing lots of issues and building strong ground for every fp execution on PULPOpen! A few comments to address but no critical ones.

@runwangdl runwangdl changed the title [Draft] Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform Feb 13, 2025
@Victor-Jung Victor-Jung added the enhancement New feature or request label Feb 13, 2025
@runwangdl runwangdl changed the title Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform Add Tiling Support to All CCT Kernels and Fix CCT Operators on Siracusa Platform for L2 Feb 13, 2025
Signed-off-by: Victor Jung <33875047+Victor-Jung@users.noreply.github.com>
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.

I agree with the interface that you used (CodeGenVerbosity) but I don't like that the pass is in the PULPTiling pass. A small change and this will roll.

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.

LGTM, thanks for addressing my comments!

@Victor-Jung Victor-Jung merged commit 9c3162a into pulp-platform:devel Feb 17, 2025
216 checks passed
runwangdl added a commit to runwangdl/Deeploy that referenced this pull request Feb 23, 2025
…sa Platform for L2 (pulp-platform#35)

* Update CCT onnx without broadcast and Upload CCT two version(16,32)
* Update CCT on PULP with Tiling

---------

Co-authored-by: Victor Jung <33875047+Victor-Jung@users.noreply.github.com>

Update CCT on PULP with Tiling

Add PULPProfileUntiled Pass
runwangdl added a commit to runwangdl/Deeploy that referenced this pull request Feb 23, 2025
…sa Platform for L2 (pulp-platform#35)

* Update CCT onnx without broadcast and Upload CCT two version(16,32)
* Update CCT on PULP with Tiling

---------

Co-authored-by: Victor Jung <33875047+Victor-Jung@users.noreply.github.com>
runwangdl added a commit to runwangdl/Deeploy that referenced this pull request Feb 23, 2025
…sa Platform for L2 (pulp-platform#35)

* Update CCT onnx without broadcast and Upload CCT two version(16,32)
* Update CCT on PULP with Tiling

---------

Co-authored-by: Victor Jung <33875047+Victor-Jung@users.noreply.github.com>

Update CCT on PULP with Tiling

Add PULPProfileUntiled Pass
runwangdl added a commit to runwangdl/Deeploy that referenced this pull request Feb 26, 2025
…sa Platform for L2 (pulp-platform#35)

* Update CCT onnx without broadcast and Upload CCT two version(16,32)
* Update CCT on PULP with Tiling

---------

Co-authored-by: Victor Jung <33875047+Victor-Jung@users.noreply.github.com>

Update CCT on PULP with Tiling

Add PULPProfileUntiled Pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants