Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
4c520ce
Conv2D Bias Adaptation
diaconuccalin Jul 29, 2025
4939aa9
Adde PULPOpen support for Conv2D and partially working DW Conv2D. Fix…
diaconuccalin Aug 7, 2025
8f7398b
DW 2D Float Conv for PULPOpen platform now working. Updated im2col bu…
diaconuccalin Sep 18, 2025
5189803
Optimized the PULPOpen DW 2D fp32 Convolution and fixed the bias vers…
diaconuccalin Sep 19, 2025
daf7ca1
Fixed generic platform alias_of bug
diaconuccalin Sep 22, 2025
a03b08b
Fixed the PULPOpen FloatGemmTemplate (identical issue to the generic …
diaconuccalin Sep 22, 2025
61e42a9
Added GEMM batched fix to MatMul template
diaconuccalin Sep 23, 2025
b34bb8b
Fixed formatting
diaconuccalin Sep 23, 2025
f8f218e
Fixes to avoid warnings
diaconuccalin Sep 23, 2025
2c558da
Merge fix
diaconuccalin Sep 23, 2025
6cd8c7d
Dynamic buffer calculation fix. Other fixes
diaconuccalin Sep 24, 2025
d21d2a4
Reformat
diaconuccalin Sep 24, 2025
b3311e9
Added back CI tests removed by merge
diaconuccalin Sep 24, 2025
693af91
Applied fixes suggested in the PR review
diaconuccalin Sep 24, 2025
d1156c0
Post-merge fixes
diaconuccalin Oct 13, 2025
fc8a24a
PR fixes
diaconuccalin Oct 17, 2025
3d3fb7c
Addressed PR review. Minor fix for aliasing in reshape parser
diaconuccalin Oct 21, 2025
e00873f
Minor fix based on PR review
diaconuccalin Oct 21, 2025
6535455
Post-rebase fixes
diaconuccalin Oct 27, 2025
3e14b1d
More post-rebase fixes
diaconuccalin Oct 27, 2025
33296de
Fix aliases parameter issues
diaconuccalin Oct 27, 2025
3288081
Fixes based on CodeRabbit PR Reviews
diaconuccalin Oct 27, 2025
d764274
Removed alias leftovers
diaconuccalin Oct 28, 2025
04e41a0
Reduced code duplication in PULP Conv2D parsers
diaconuccalin Oct 28, 2025
39d44e1
Restrained n_cores usage to PULP
diaconuccalin Oct 30, 2025
0c11dcc
Quickfix
diaconuccalin Oct 30, 2025
bb34bcd
Fix based on CodeRabbit review
diaconuccalin Oct 30, 2025
c565715
Remove n_cores annotation from context and parser
lukamac Oct 31, 2025
0255563
Revert unnecessary changes
lukamac Oct 31, 2025
79f8ff7
Rename --n_cores flag to --cores to align with the preexisting siracu…
lukamac Oct 31, 2025
b998fe3
Use parsed args instead of an extra argument to testRunner
lukamac Nov 1, 2025
a5ef2f7
Revert removal of header guard and addition of full license in the he…
lukamac Nov 1, 2025
2676305
Fix missing space between `--cores` argument and previous args
lukamac Nov 1, 2025
f887380
Conv2D Bias Adaptation
diaconuccalin Jul 29, 2025
3688799
Adde PULPOpen support for Conv2D and partially working DW Conv2D. Fix…
diaconuccalin Aug 7, 2025
91d6cae
DW 2D Float Conv for PULPOpen platform now working. Updated im2col bu…
diaconuccalin Sep 18, 2025
bbbf51b
Optimized the PULPOpen DW 2D fp32 Convolution and fixed the bias vers…
diaconuccalin Sep 19, 2025
e7a3b8a
Fixed generic platform alias_of bug
diaconuccalin Sep 22, 2025
37968e0
Fixed the PULPOpen FloatGemmTemplate (identical issue to the generic …
diaconuccalin Sep 22, 2025
fcd8c3f
Fixed formatting
diaconuccalin Sep 23, 2025
cc8d0d3
Fixes to avoid warnings
diaconuccalin Sep 23, 2025
d38aabb
Merge fix
diaconuccalin Sep 23, 2025
470c22c
Dynamic buffer calculation fix. Other fixes
diaconuccalin Sep 24, 2025
3991621
Applied fixes suggested in the PR review
diaconuccalin Sep 24, 2025
ae87713
Post-merge fixes
diaconuccalin Oct 13, 2025
37219a1
Included bias handling in tile constraint handling for conv 2D. Fix i…
diaconuccalin Sep 30, 2025
3e19639
Fixed input cube computation for 2D conv tiling
diaconuccalin Sep 30, 2025
f692bac
Added tiling bias handling for regular Conv2D in PULPOpen
diaconuccalin Oct 2, 2025
7300a32
Added core number information to the network container, for buffer al…
diaconuccalin Oct 3, 2025
2839018
Added non-RQ FP DW Conv2D tiling-ready binding and constraints. Test …
diaconuccalin Oct 8, 2025
e2bb599
Bias support for DW 2d Conv tiling. im2col buffer computation fix. co…
diaconuccalin Oct 8, 2025
bf99985
Added broadcasting handling for MatMul tile constraint. Fixed formatting
diaconuccalin Oct 9, 2025
2e5042e
Added prototypes for PULPOpen Slice and ReduceMean tiling constraints
diaconuccalin Oct 9, 2025
6088ae8
Added geometrical constraint and serialization for the slice operation
diaconuccalin Oct 10, 2025
52514bf
Added geometrical constraints and tiling serialization to the ReduceM…
diaconuccalin Oct 10, 2025
19810af
Updated PULP GELU function to generic version (while keeping the para…
diaconuccalin Oct 10, 2025
021d229
Fix core number value passing. Minor PULP GELU clean up
diaconuccalin Oct 11, 2025
f44aea9
Fixed PULP DW 2D Conv geometrical tile constraints
diaconuccalin Oct 11, 2025
fa18f33
Fixes in DWConv2D and MatMul tile constraints
diaconuccalin Oct 11, 2025
caa513c
Fixed formatting
diaconuccalin Oct 11, 2025
973e200
MatMul constraint fix
diaconuccalin Oct 12, 2025
06c9693
Fixed unique item check
diaconuccalin Oct 22, 2025
0b4b501
Format fix
diaconuccalin Oct 22, 2025
07a409c
PR cleanup
diaconuccalin Nov 4, 2025
bb46c70
Quick change
diaconuccalin Nov 4, 2025
c815faa
Quickfix
diaconuccalin Nov 4, 2025
107b893
Quickfix
diaconuccalin Nov 4, 2025
a1edcac
Post-rebase fix
diaconuccalin Nov 12, 2025
914550d
Loosen constraints for PULP FP Conv2D to accept input tiling on x and…
diaconuccalin Nov 13, 2025
28fc670
Fix for Conv2D tiling overflow at edges of input
diaconuccalin Nov 13, 2025
4d6f129
Clean-up Conv2D geometrical constraints
diaconuccalin Nov 13, 2025
cae8406
Format fix
diaconuccalin Nov 13, 2025
a73b7c4
Fixed bug in Conv2D tiling constraints and reduced some code duplicat…
diaconuccalin Nov 13, 2025
46c8fb5
Fix formatting
diaconuccalin Nov 13, 2025
01b5dc1
Bug fix in padding computation (now using absolute offset, since rela…
diaconuccalin Nov 16, 2025
2f89b42
Quickfix for None value checking for absolute output offset in conv2d
diaconuccalin Nov 16, 2025
09d7701
Improved previously found solution for convolution input constraint (…
diaconuccalin Nov 16, 2025
d3afc56
Removed unnecessary PULP Conv2D tile constraint. Decreased limits for…
diaconuccalin Nov 16, 2025
4ed02d4
Debugging and Conv2D constraint documentation improvements
diaconuccalin Nov 16, 2025
cf6099d
Reduce code duplication for DW Conv2D constraints. PULP Conv2D InCube…
diaconuccalin Nov 17, 2025
1ebe26a
Fixed bugs in code generation incorrect type casting. Cleaned up PULP…
diaconuccalin Nov 18, 2025
eecf135
PULP FP Conv2D Constraint fix to use effective input WH for policy co…
diaconuccalin Nov 18, 2025
bd24a5e
Added Demo TinyViT FP test for Siracusa Tiled. Updated test L1 limits…
diaconuccalin Nov 18, 2025
bcef1af
Reverted im2col dim computation for DW Conv. Updated CHANGELOG
diaconuccalin Nov 18, 2025
e03cd85
Improved comments and removed unnecessary components
diaconuccalin Nov 18, 2025
f65282b
Applied Code Rabbit automatic recommendations
diaconuccalin Nov 19, 2025
54acf5b
Applied ReduceMeanConstraint automatically recommended by Coder Rabbit
diaconuccalin Nov 19, 2025
97f7c83
Applied Code Rabbit suggested change
diaconuccalin Nov 19, 2025
fea1d26
Apply commit review and temporary fix of Slice and ReduceMean PULP co…
diaconuccalin Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 34 additions & 10 deletions .github/workflows/ci-platform-siracusa-tiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ jobs:
{"name":"Hardswish","L1":[750]},
{"name":"RQHardswish","L1":[750]},
{"name":"testFloatGEMM","L1":[8000]},
{"name":"testFloat2DConvolution","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":"testFloatRelu","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]},
Expand All @@ -78,11 +87,20 @@ jobs:
{"name":"Hardswish","L1":[750]},
{"name":"RQHardswish","L1":[800]},
{"name":"testFloatGEMM","L1":[8000]},
{"name":"testFloat2DConvolution","L1":[15000]},

{"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":"testFloatRelu","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]}
Expand Down Expand Up @@ -117,9 +135,11 @@ jobs:
- name: "MLPerf/AnomalyDetection"
L1: [64000]
- name: "CCT/CCT_1_16_16_8"
L1: [64000]
L1: [2000, 64000]
- name: "testTrainCCT/CCT1_Classifier_Training/CCT_1_16_16_8"
L1: [64000]
L1: [4000, 64000]
- name: "testFloatDemoTinyViT"
L1: [4000]
num-cores: [8]
uses: ./.github/workflows/_runner-siracusa-tiled.yml
with:
Expand Down Expand Up @@ -148,9 +168,11 @@ jobs:
- name: "microLlama/microLlama1"
L1: [60000, 10000, 5000]
- name: "CCT/CCT_2_32_32_128"
L1: [128000]
L1: [64000, 128000]
- name: "testTrainCCT/CCT1_Classifier_Training/CCT_1_16_16_128"
L1: [64000]
L1: [32000, 64000]
- name: "testFloatDemoTinyViT"
L1: [4000]
num-cores: [8]
default-memory-level: ["L3"]
uses: ./.github/workflows/_runner-siracusa-tiled.yml
Expand Down Expand Up @@ -186,9 +208,11 @@ jobs:
- name: "microLlama/microLlama8_parallel"
L1: [60000, 20000, 10000]
- name: "CCT/CCT_2_32_32_128"
L1: [128000]
L1: [64000, 128000]
- name: "testTrainCCT/CCT1_Classifier_Training/CCT_1_16_16_128"
L1: [64000]
L1: [8000, 64000]
- name: "testFloatDemoTinyViT"
L1: [4000]
num-cores: [8]
double-buffer: [true]
default-memory-level: ["L3"]
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This file contains the changelog for the Deeploy project. The changelog is divid
## Unreleased (Planned Release Target: v0.2.1)

### List of Pull Requests
- Demo TinyViT compatibility with tiled Siracusa [#124](https://github.com/pulp-platform/Deeploy/pull/124)
- TinyViT on non-tiled Siracusa [#117](https://github.com/pulp-platform/Deeploy/pull/117)
- Support Fully Asynchronous DMAs [#114](https://github.com/pulp-platform/Deeploy/pull/114)
- Disallow shape inference [#128](https://github.com/pulp-platform/Deeploy/pull/128)
Expand All @@ -25,6 +26,10 @@ This file contains the changelog for the Deeploy project. The changelog is divid
- Fix bias hoisting in generic GEMM with no bias [#126](https://github.com/pulp-platform/Deeploy/pull/126)

### Added
- Support for input tiling for PULP FP regular and DW conv 2D.
- CI tests for tiled Siracusa FP regular and DW conv 2D, with and without bias, for skip connections, and for the demo version of TinyViT.
- Documentation for PULP FP regular and DW conv 2D and MatMul tile constraints.
- PULP ReduceMean and Slice tile constraints.
- PULP 2D FP DW conv Im2Col template and kernel, with bias support.
- Bias support for PULP 2D FP regular conv Im2Col in template & kernel.
- PULP FP DW conv 2D parser.
Expand Down Expand Up @@ -70,6 +75,7 @@ This file contains the changelog for the Deeploy project. The changelog is divid
- annotateNCores method to PULPDeployer that adds an `n_cores` key to all PULPClusterEngine templates' operatorRepresentations

### Changed
- Decreased L1 maximal memory limit for CI pipeline tests where compatible thanks to the implementation of Conv2D input tiling support.
- Reduced size of reshape & skip connection test, for non-tiled Siracusa memory compatibility.
- Replaced platform-specific tags (`*-amd64`, `*-arm64`) with direct digest references in `Noelware/docker-manifest-action`.
- mchan HAL is now reduced to bare-bones
Expand Down Expand Up @@ -109,6 +115,10 @@ This file contains the changelog for the Deeploy project. The changelog is divid
- changed `_mapNode` to `_selectEngine` which reduces the responsibility of that function to, as the name states, just engine selection

### Fixed
- Fixed PULP FP32 regular and DW Conv2D, and MatMul tile constraints.
- Fixed type casting for tiling code generation.
- Fixed bug in buffer name identification in code generation for tests with L3 default memory level.
- PULP GELU kernel to use tanh approximation.
- Fixed bug for non-batched elements in the PULPOpen FP GEMM and matmul templates.
- Added underscore to the beginning of closure names to avoid naming issues when they start with unsupported first characters (like numbers).
- Data types in the PULPOpen FP add and mul templates.
Expand Down
2 changes: 1 addition & 1 deletion Deeploy/DeeployTypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class _ReferenceBuffer(VariableBuffer):
% if offset is None:
${type.typeName} ${name} = (${type.typeName}) ${referenceName};\\
% else:
${type.typeName} ${name} = (${type.typeName}) ${referenceName} + ${offset};\\
${type.typeName} ${name} = (${type.typeName})((char*) ${referenceName} + ${offset});\\
% endif
""")
deallocTemplate = NodeTemplate("")
Expand Down
18 changes: 11 additions & 7 deletions Deeploy/Targets/PULPOpen/Bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,17 @@

PULPSliceBindings = [
NodeBinding(
SliceChecker([
PointerClass(type),
PointerClass(uint8_t),
PointerClass(uint8_t),
PointerClass(uint8_t),
PointerClass(uint8_t)
], [PointerClass(type)]), SliceTemplate.referenceTemplate, ForkTransformer) for type in FloatDataTypes
SliceChecker(
[
PointerClass(float_type), # data_in
PointerClass(int_type), # starts
PointerClass(int_type), # ends
PointerClass(int_type), # axes
PointerClass(int_type) # steps
],
[PointerClass(float_type)]),
SliceTemplate.referenceTemplate,
ForkTransformer) for float_type in FloatDataTypes for int_type in IntegerDataTypes
]

PULPReshapeBindings = [
Expand Down
25 changes: 13 additions & 12 deletions Deeploy/Targets/PULPOpen/Platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,22 @@
MergeConstAddAndRequantPass, MergeTrueIntegerDivRequantShiftPass, QuantPatternPass, RQSSplitPass, \
SkipEmptyConcatPass, SkipUnityRequantPass, iGELURequantMergePass, iHardswishRequantMergePass
from Deeploy.Targets.PULPOpen.Bindings import BasicDequantBindings, BasicQuantBindings, PULPConv1DBinding, \
PULPDMASliceBindings, PULPDWConv1DBinding, PULPFloatDWConv2DBindings, PULPReduceMeanBindings, PULPSliceBindings
PULPDMASliceBindings, PULPDWConv1DBinding
from Deeploy.Targets.PULPOpen.Layers import PULPRQSConvLayer, PULPRQSGEMMLayer
from Deeploy.Targets.PULPOpen.Parsers import PULPConv1DParser, PULPConv2DParser, PULPDWConv1DParser, \
PULPDWConv2DParser, PULPFPConv2DParser, PULPFPDWConv2DParser, PULPGEMMParser, PULPMatrixVecParser, \
PULPTallGEMMParser
from Deeploy.Targets.PULPOpen.Templates import AllocateTemplate, FreeTemplate
from Deeploy.Targets.PULPOpen.Tiler import PULPAddTilingReadyBindings, PULPConcatTilingReadyBindings, \
PULPConv2DTilingReadyBindings, PULPFlattenTilingReadyBindings, PULPFPGELUTilingReadyBindings, \
PULPFPGEMMTilingReadyBindings, PULPGatherTilingReadyBindings, PULPiHardswishTilingReadyBindings, \
PULPiRMSNormTilingReadyBindings, PULPiRQSGELUTilingReadyBindings, PULPLayernormTilingReadyBindings, \
PULPMatMulTilingReadyBindings, PULPMaxPool2DTilingReadyBindings, PULPMulTilingReadyBindings, \
PULPReduceSumTilingReadyBindings, PULPReluTilingReadyBindings, PULPRQAddTilingReadyBindings, \
PULPRQSConv2DTilingReadyBindings, PULPRQSDWConv2DTilingReadyBindings, PULPRQSGEMMTilingReadyBindings, \
PULPRQSiHardswishTilingReadyBindings, PULPRQSMatrixVecTilingReadyBindings, PULPRQSTallGEMMTilingReadyBindings, \
PULPRQSTilingReadyBindings, PULPSGDTilingReadyBindings, PULPSoftmaxCrossEntropyGradTilingReadyBindings, \
PULPConv2DTilingReadyBindings, PULPDWConv2DTilingReadyBindings, PULPFlattenTilingReadyBindings, \
PULPFPGELUTilingReadyBindings, PULPFPGEMMTilingReadyBindings, PULPGatherTilingReadyBindings, \
PULPiHardswishTilingReadyBindings, PULPiRMSNormTilingReadyBindings, PULPiRQSGELUTilingReadyBindings, \
PULPLayernormTilingReadyBindings, PULPMatMulTilingReadyBindings, PULPMaxPool2DTilingReadyBindings, \
PULPMulTilingReadyBindings, PULPReduceMeanTilingReadyBindings, PULPReduceSumTilingReadyBindings, \
PULPReluTilingReadyBindings, PULPRQAddTilingReadyBindings, PULPRQSConv2DTilingReadyBindings, \
PULPRQSDWConv2DTilingReadyBindings, PULPRQSGEMMTilingReadyBindings, PULPRQSiHardswishTilingReadyBindings, \
PULPRQSMatrixVecTilingReadyBindings, PULPRQSTallGEMMTilingReadyBindings, PULPRQSTilingReadyBindings, \
PULPSGDTilingReadyBindings, PULPSliceTilingReadyBindings, PULPSoftmaxCrossEntropyGradTilingReadyBindings, \
PULPSoftmaxCrossEntropyTilingReadyBindings, PULPSoftmaxGradTilingReadyBindings, PULPSoftmaxTilingReadyBindings, \
PULPTransposeTilingReadyBindings, PULPUniformRQSTilingReadyBindings
from Deeploy.Targets.PULPOpen.TopologyOptimizationPasses.Passes import PULPAddRequantMergePass, \
Expand All @@ -64,7 +65,7 @@
RequantShiftMapper = NodeMapper(RequantShiftParser(), PULPRQSTilingReadyBindings)
UniformRequantShiftMapper = NodeMapper(UniformRequantShiftParser(), PULPUniformRQSTilingReadyBindings)

ReduceMeanMapper = NodeMapper(ReduceMeanParser(), PULPReduceMeanBindings)
ReduceMeanMapper = NodeMapper(ReduceMeanParser(), PULPReduceMeanTilingReadyBindings)
ReduceSumMapper = NodeMapper(ReduceSumParser(), PULPReduceSumTilingReadyBindings)
MatMulMapper = NodeMapper(MatMulParser(), PULPMatMulTilingReadyBindings)
RQIntegerDivMapper = NodeMapper(RQIntegerDivParser(), [BasicRQIntegerDivBinding])
Expand All @@ -74,7 +75,7 @@
DWConv1DMapper = NodeMapper(PULPDWConv1DParser(), [PULPDWConv1DBinding])
FPConv2DMapper = NodeMapper(PULPFPConv2DParser(), PULPConv2DTilingReadyBindings)
Conv2DMapper = NodeMapper(PULPConv2DParser(), PULPRQSConv2DTilingReadyBindings)
FPDWConv2DMapper = NodeMapper(PULPFPDWConv2DParser(), PULPFloatDWConv2DBindings)
FPDWConv2DMapper = NodeMapper(PULPFPDWConv2DParser(), PULPDWConv2DTilingReadyBindings)
DWConv2DMapper = NodeMapper(PULPDWConv2DParser(), PULPRQSDWConv2DTilingReadyBindings)
GEMMMapper = NodeMapper(PULPGEMMParser(), PULPRQSGEMMTilingReadyBindings)
FloatGEMMMapper = NodeMapper(GEMMParser(), PULPFPGEMMTilingReadyBindings)
Expand All @@ -91,7 +92,7 @@

DMASliceMapper = NodeMapper(SliceParser(), PULPDMASliceBindings)

SliceMapper = NodeMapper(SliceParser(), PULPSliceBindings)
SliceMapper = NodeMapper(SliceParser(), PULPSliceTilingReadyBindings)

iRMSNormMapper = NodeMapper(iRMSNormParser(), PULPiRMSNormTilingReadyBindings)

Expand Down
Loading
Loading