Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"image": "ghcr.io/pulp-platform/deeploy:main",
"name": "deeploy_main",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"twxs.cmake",
"josetr.cmake-language-support-vscode",
"ms-vscode.cmake-tools",
"ms-python.python",
"ms-vscode-remote.remote-containers",
"rioj7.command-variable"
]
}
},
"mounts": [
{
"source": "${localWorkspaceFolder}",
"target": "/app/Deeploy",
"type": "bind"
}
]
}
35 changes: 25 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI

on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
workflow_dispatch:
inputs:
Expand All @@ -14,25 +18,36 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOCKER_IMAGE: ${{ github.event.inputs.docker_image_deeploy || (github.ref_name == 'main' && 'ghcr.io/pulp-platform/deeploy:main' || 'ghcr.io/pulp-platform/deeploy:devel') }}

jobs:

select-docker-image-and-runner:
runs-on: ubuntu-latest
outputs:
image: ${{ steps.set-docker-image.outputs.image }}
runner: ${{ steps.set-runner.outputs.runner }}
steps:
- id: set-docker-image
run: echo "::set-output name=image::${{ env.DOCKER_IMAGE }}"
run: |
if [[ -n "${{ github.event.inputs.docker_image_deeploy }}" ]]; then
IMAGE="${{ github.event.inputs.docker_image_deeploy }}"
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
TAG_NAME="${GITHUB_REF##refs/tags/}"
IMAGE="ghcr.io/pulp-platform/deeploy:${TAG_NAME}"
elif [[ "${{ github.ref_name }}" == "main" ]]; then
IMAGE="ghcr.io/pulp-platform/deeploy:main"
else
IMAGE="ghcr.io/pulp-platform/deeploy:devel"
fi
echo "Selected image: ${IMAGE}"
echo "image=${IMAGE}" >> $GITHUB_OUTPUT

- id: set-runner
run: |
if [[ "${{ github.repository }}" == "pulp-platform/Deeploy" ]]; then
echo "::set-output name=runner::self-hosted"
echo "Selected self-hosted runner for Deeploy repository"
echo "runner=self-hosted" >> $GITHUB_OUTPUT
else
echo "::set-output name=runner::ubuntu-latest"
echo "Selected ubuntu-latest runner for external repository"
echo "runner=ubuntu-latest" >> $GITHUB_OUTPUT
fi

build-deeploy:
Expand Down Expand Up @@ -117,7 +132,7 @@ jobs:
miniMobileNetv2
CCT/CCT_1_16_16_8
testFloatDemoTinyViT

### SoftHier Tests ###
softhier-kernels:
uses: ./.github/workflows/TestRunnerSoftHier.yml
Expand Down Expand Up @@ -170,8 +185,8 @@ jobs:
Adder
simulators: |
gvsoc


### Snitch Tests ###
snitch-kernels:
uses: ./.github/workflows/TestRunnerSnitch.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
sphinx-build docs _build
- name: Prepare Multipages
uses: rkdarst/gh-pages-multibranch@main
uses: xeratec/gh-pages-multibranch@pr/support_tags
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
with:
directory: _build
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ run_generic_test_kernels: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
parallel:
matrix:
- TEST: [Adder, MultIO, test1DConvolution, test2DConvolution, test1DDWConvolution, test2DDWConvolution, test1DPad, test2DPad, testGEMM, testMatMul, testMatMulAdd, testMaxPool, testRQConv, testRQMatMul, testReduceSum, testReduceMean, testSlice, testRequantizedDWConv, test2DRequantizedConv, iSoftmax]
- TEST: [Adder, MultIO, test1DConvolution, test2DConvolution, test1DDWConvolution, test2DDWConvolution, test1DPad, test2DPad, testConcat, testGEMM, testMatMul, testMatMulAdd, testMaxPool, testRQConv, testRQMatMul, testReduceSum, testReduceMean, testSlice, testRequantizedDWConv, test2DRequantizedConv, iSoftmax]
script:
- !reference [.setup_test, script]
- python testRunner_generic.py -t ./Tests/$TEST --toolchain=$TOOLCHAIN --toolchain_install_dir=$LLVM_INSTALL_DIR
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Changelog
This file contains the changelog for the Deeploy project. The changelog is divided into sections based on the version of the project. Each section contains a list of pull requests, features, changes, fixes, and removals that were made in that version.

## Unreleased (Planned Release Target: v0.2.0)
## Release v0.2.0 (2025-07-09)
This release containing major architectural changes, new platform support, enhanced simulation workflows, floating-point kernel support, training infrastructure for CCT models, memory allocation strategies, and documentation improvements.

### List of Pull Requests
- Prepare v0.2.0 release [#102](https://github.com/pulp-platform/Deeploy/pull/102)
- Add Luka as Code Owner [#101](https://github.com/pulp-platform/Deeploy/pull/101)
- Fix CI, Docker Files, and Documentation Workflow [#100](https://github.com/pulp-platform/Deeploy/pull/100)
- Chimera Platform Integration [#96](https://github.com/pulp-platform/Deeploy/pull/96)
Expand Down
34 changes: 18 additions & 16 deletions Deeploy/Targets/Generic/Platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@
RemoveEmptyConvBiasPass
from Deeploy.DeeployTypes import ConstantBuffer, DeploymentEngine, DeploymentPlatform, NodeMapper, NodeTemplate, \
StructBuffer, TopologyOptimizer, TransientBuffer, VariableBuffer
from Deeploy.Targets.Generic.Bindings import BasicAddBindings, BasicConv1DBinding, BasicConv2DBindings, \
BasicDebugPrintBindings, BasicDequantBindings, BasicDivBindings, BasicDWConv1DBinding, BasicDWConv2DBindings, \
BasicGatherBindings, BasicGELUBindings, BasicGEMMBindings, BasicITAPartialSoftmaxBinding, BasicITASoftmaxBinding, \
BasicLayerNormBindings, BasicMatMulBindings, BasicMaxPool2DBindings, BasicMulBindings, BasicPad1DBindings, \
BasicPad2DBindings, BasicQuantBindings, BasicReduceMeanBindings, BasicReduceSumBindings, BasicReluBinding, \
BasicReshapeBindings, BasicRQIntegerDivBinding, BasicRQSBindings, BasicRQSGELUBinding, BasicSliceBindings, \
BasicSoftmaxBindings, BasicTransposeBindings, DummyBinding
from Deeploy.Targets.Generic.Layers import AddLayer, ConvLayer, DebugPrintLayer, DequantLayer, DivLayer, GatherLayer, \
GELULayer, GEMMLayer, ITAMaxLayer, LayerNormLayer, MatMulLayer, MaxPoolLayer, MulLayer, PadLayer, QuantLayer, \
ReduceMeanLayer, ReduceSumLayer, ReluLayer, RequantShiftLayer, ReshapeLayer, RQIntegerDivLayer, RQSiGELULayer, \
SliceLayer, SoftmaxLayer, TransposeLayer
from Deeploy.Targets.Generic.Parsers import AddParser, DebugParser, DequantParser, DivParser, DummyParser, \
FlattenParser, GatherParser, GELUParser, GenericConv1DParser, GenericConv2DParser, GenericDWConv1DParser, \
GenericDWConv2DParser, GenericGEMMParser, GenericMaxPool2DParser, IntegerDivParser, ITAMaxParser, \
ITAPartialMaxParser, LayerNormParser, MatMulParser, MulParser, Pad1DParser, Pad2DParser, QuantParser, \
ReduceMeanParser, ReduceSumParser, ReluParser, RequantShiftParser, ReshapeParser, RQIntegerDivParser, \
from Deeploy.Targets.Generic.Bindings import BasicAddBindings, BasicConcatBindings, BasicConv1DBinding, \
BasicConv2DBindings, BasicDebugPrintBindings, BasicDequantBindings, BasicDivBindings, BasicDWConv1DBinding, \
BasicDWConv2DBindings, BasicGatherBindings, BasicGELUBindings, BasicGEMMBindings, BasicITAPartialSoftmaxBinding, \
BasicITASoftmaxBinding, BasicLayerNormBindings, BasicMatMulBindings, BasicMaxPool2DBindings, BasicMulBindings, \
BasicPad1DBindings, BasicPad2DBindings, BasicQuantBindings, BasicReduceMeanBindings, BasicReduceSumBindings, \
BasicReluBinding, BasicReshapeBindings, BasicRQIntegerDivBinding, BasicRQSBindings, BasicRQSGELUBinding, \
BasicSliceBindings, BasicSoftmaxBindings, BasicTransposeBindings, DummyBinding
from Deeploy.Targets.Generic.Layers import AddLayer, ConcatLayer, ConvLayer, DebugPrintLayer, DequantLayer, DivLayer, \
GatherLayer, GELULayer, GEMMLayer, ITAMaxLayer, LayerNormLayer, MatMulLayer, MaxPoolLayer, MulLayer, PadLayer, \
QuantLayer, ReduceMeanLayer, ReduceSumLayer, ReluLayer, RequantShiftLayer, ReshapeLayer, RQIntegerDivLayer, \
RQSiGELULayer, SliceLayer, SoftmaxLayer, TransposeLayer
from Deeploy.Targets.Generic.Parsers import AddParser, ConcatParser, DebugParser, DequantParser, DivParser, \
DummyParser, FlattenParser, GatherParser, GELUParser, GenericConv1DParser, GenericConv2DParser, \
GenericDWConv1DParser, GenericDWConv2DParser, GenericGEMMParser, GenericMaxPool2DParser, IntegerDivParser, \
ITAMaxParser, ITAPartialMaxParser, LayerNormParser, MatMulParser, MulParser, Pad1DParser, Pad2DParser, \
QuantParser, ReduceMeanParser, ReduceSumParser, ReluParser, RequantShiftParser, ReshapeParser, RQIntegerDivParser, \
RQSiGELUParser, SliceParser, SoftmaxParser, TransposeParser, UnsqueezeParser, iLayerNormParser, iSoftmaxParser
from Deeploy.Targets.Generic.Templates import AllocateTemplate, FreeTemplate
from Deeploy.Targets.Generic.TopologyOptimizationPasses.Passes import DequantPatternPass, ExtractPaddingFromConvPass, \
Expand All @@ -55,6 +55,7 @@
AddMapper = NodeMapper(AddParser(), BasicAddBindings)
Conv1DMapper = NodeMapper(GenericConv1DParser(), [BasicConv1DBinding])
Conv2DMapper = NodeMapper(GenericConv2DParser(), BasicConv2DBindings)
ConcatMapper = NodeMapper(ConcatParser(), BasicConcatBindings)
DebugMapper = NodeMapper(DebugParser(), BasicDebugPrintBindings)
DWConv1DMapper = NodeMapper(GenericDWConv1DParser(), [BasicDWConv1DBinding])
DWConv2DMapper = NodeMapper(GenericDWConv2DParser(), BasicDWConv2DBindings)
Expand Down Expand Up @@ -96,6 +97,7 @@
GenericMapping = {
'Add': AddLayer([AddMapper]),
'Conv': ConvLayer([Conv2DMapper, DWConv2DMapper, Conv1DMapper, DWConv1DMapper]),
'Concat': ConcatLayer([ConcatMapper]),
'DebugPrint': DebugPrintLayer([DebugMapper]),
'Div': DivLayer([DivMapper]),
'Flatten': ReshapeLayer([FlattenMapper]),
Expand Down
31 changes: 27 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
# limitations under the License.

import os
import subprocess
import sys

sys.path.insert(0, os.path.abspath('../'))
Expand Down Expand Up @@ -62,13 +63,35 @@
# -- Options for HTML templates ------------------------------------------------

# Extract branch name from git
branch = os.popen("git rev-parse --abbrev-ref HEAD").read().strip()

# Try to get branch name
branch = None
try:
branch = subprocess.check_output(["git", "symbolic-ref", "--short", "HEAD"],
stderr = subprocess.DEVNULL).decode().strip()
except subprocess.CalledProcessError:
pass # Not a branch, maybe a tag?

# Try to get tag name if branch not available
tag = None
if not branch:
try:
tag = subprocess.check_output(["git", "describe", "--tags", "--exact-match"],
stderr = subprocess.DEVNULL).decode().strip()
except subprocess.CalledProcessError:
pass # Not on a tag either

# Fallback
current = branch or tag or "unknown"

html_context = {
'current_version':
f"{branch}",
'versions': [["main", f"https://pulp-platform.github.io/Deeploy"],
["devel", f"https://pulp-platform.github.io/Deeploy/branch/devel"]],
current,
'versions': [
["main", "https://pulp-platform.github.io/Deeploy"],
["devel", "https://pulp-platform.github.io/Deeploy/branch/devel"],
["v0.2.0", "https://pulp-platform.github.io/Deeploy/tag/v0.2.0"],
],
}

# -- Options for myst_parser -------------------------------------------------
Expand Down
Loading