Skip to content
Open
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
1 change: 0 additions & 1 deletion .github/workflows/_runner-gap9-tiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
source /app/install/gap9-sdk/.gap9-venv/bin/activate
source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true
export GVSOC_INSTALL_DIR=/app/install/gap9-sdk/install/workstation
export GAP_RISCV_GCC_TOOLCHAIN=/app/install/gcc/gap9
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/_runner-gap9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
source /app/install/gap9-sdk/.gap9-venv/bin/activate
source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true
export GVSOC_INSTALL_DIR=/app/install/gap9-sdk/install/workstation
export GAP_RISCV_GCC_TOOLCHAIN=/app/install/gcc/gap9
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-platform-gap9-tiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ concurrency:

jobs:
select-env:
if: github.repository == 'pulp-platform/Deeploy'
uses: ./.github/workflows/_select-env.yml
with:
docker_image_deeploy: ${{ github.event.inputs.docker_image_deeploy || github.repository == 'pulp-platform/Deeploy' && 'ghcr.io/pulp-platform/deeploy-gap9:latest'}}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-platform-gap9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ concurrency:

jobs:
select-env:
if: github.repository == 'pulp-platform/Deeploy'
uses: ./.github/workflows/_select-env.yml
with:
docker_image_deeploy: ${{ github.event.inputs.docker_image_deeploy || (github.repository == 'pulp-platform/Deeploy' && 'ghcr.io/pulp-platform/deeploy-gap9:latest') }}
Expand Down
150 changes: 150 additions & 0 deletions .github/workflows/docker-build-deeploy-gap9.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
#
# SPDX-License-Identifier: Apache-2.0

---
name: Docker • Build Deeploy GAP9 Container

"on":
workflow_dispatch:
inputs:
docker_image_deeploy:
description: "Deeploy Image to use"
required: false
default: "ghcr.io/pulp-platform/deeploy:latest"

jobs:
prepare:
name: Fetch branch name or tag
runs-on: ubuntu-latest
outputs:
docker_tag: ${{ steps.generate_tag.outputs.docker_tag }}
steps:
- uses: actions/checkout@v4

- name: Set up environment variables
run: |
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "IS_TAG=${GITHUB_REF_TYPE}" >> $GITHUB_ENV

- name: Set Docker tag
id: generate_tag
run: |
if [[ "${{ env.IS_TAG }}" == "tag" ]]; then
echo "docker_tag=${{ env.TAG_NAME }}" >> $GITHUB_OUTPUT
else
echo "docker_tag=${{ env.BRANCH_NAME }}" >> $GITHUB_OUTPUT
fi

build-deeploy-gap9:
name: Build Deeploy GAP9 Image
needs: [prepare]
runs-on: ${{ matrix.runner }}
outputs:
digest-amd64: ${{ steps.digest.outputs.digest-amd64 }}
digest-arm64: ${{ steps.digest.outputs.digest-arm64 }}
strategy:
fail-fast: false
matrix:
platform: [amd64, arm64]
include:
- platform: amd64
runner: ubuntu-latest
- platform: arm64
runner: ubuntu-22.04-arm
steps:
- uses: actions/checkout@v4

- name: Free up disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true

- uses: docker/setup-buildx-action@v3

- name: GHCR Log-in
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Cache for Docker
id: cache
uses: actions/cache@v4
with:
path: var-ccache
key: ${{ runner.os }}-${{ matrix.platform }}-build-cache-deeploy-gap9

- name: Inject build-cache
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
with:
cache-map: |
{
"var-ccache": "/ccache"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}

- name: Lower Case Repository Name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"

- name: Load SSH key
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Build and push final Deeploy image
id: build
uses: docker/build-push-action@v6
with:
platforms: linux/${{ matrix.platform }}
context: .
cache-from: type=gha
cache-to: type=gha,mode=min
file: Container/Dockerfile.deeploy-gap9
push: true
build-args: |
DEEPLOY_IMAGE=${{ github.event.inputs.docker_image_deeploy }}
ssh: default
outputs: type=image,name=ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9,annotation-index=true,name-canonical=true,push=true

- name: Extract image digest
id: digest
run: echo "digest-${{ matrix.platform }}=${{ steps.build.outputs.digest }}" >> $GITHUB_OUTPUT

merge-deeploy-gap9-images:
name: Merge Deeploy GAP9 Images
runs-on: ubuntu-latest
needs: [prepare, build-deeploy-gap9]
steps:
- name: GHCR Log-in
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lower Case Repository Name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: "${{ github.repository_owner }}"

- name: Merge Deeploy GAP9 Images
uses: Noelware/docker-manifest-action@v1
with:
inputs: |
ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9@${{ needs.build-deeploy-gap9.outputs.digest-amd64 }},
ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9@${{ needs.build-deeploy-gap9.outputs.digest-arm64 }}
tags: |
ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9:latest,
ghcr.io/${{ env.OWNER_LC }}/deeploy-gap9:${{ needs.prepare.outputs.docker_tag }}
push: true
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-deeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
env:
OWNER: "${{ github.repository_owner }}"

- name: Build and push final deploy image
- name: Build and push final Deeploy image
id: build
uses: docker/build-push-action@v6
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/infra-generate-ccache-gap9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ name: Infrastructure • Generate CCache GAP9

jobs:
generate-ccache-gap9:
if: github.repository == 'pulp-platform/Deeploy'
runs-on: ubuntu-latest
container:
image: ${{ github.event.inputs.docker_image_deeploy || 'ghcr.io/pulp-platform/deeploy-gap9:latest' }}
Expand All @@ -39,7 +40,6 @@ jobs:
source /app/install/gap9-sdk/.gap9-venv/bin/activate
source /app/install/gap9-sdk/configs/gap9_evk_audio.sh || true
export GVSOC_INSTALL_DIR=/app/install/gap9-sdk/install/workstation
export GAP_RISCV_GCC_TOOLCHAIN=/app/install/gcc/gap9
cd DeeployTest
mkdir -p /app/.ccache
export CCACHE_DIR=/app/.ccache
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ install/
compile_commands.json
toolchain/**/*/


# Node
package.json
package-lock.json
Expand Down Expand Up @@ -52,3 +53,7 @@ DeeployTest/Tests/**/generateTest.py
DeeployTest/out.txt

CHANGELOG_GEN.md

# Container Artifacts
.pyusbip/
.cache/
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ exclude: |
| .*TEST_.*
| .*TestFiles.*
| .*runtime.*
| .*\.patch
| .*prebuilt/.*
)
Expand Down Expand Up @@ -71,3 +72,7 @@ repos:
- id: yamllint
name: Lint YAML Files
stages: [pre-commit, pre-merge-commit, pre-push, manual]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.12.0-2
hooks:
- id: shfmt
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ This file contains the changelog for the Deeploy project. The changelog is divid


### List of Pull Requests
- Add GAP9 Container Support [#163](https://github.com/pulp-platform/Deeploy/pull/163)
- Extend Codeowners [#164](https://github.com/pulp-platform/Deeploy/pull/164)
- Support for MaxPool1D and RQSConv1D for PULPOpen [#146](https://github.com/pulp-platform/Deeploy/pull/146)
- Use Pre-Commit in CI [#159](https://github.com/pulp-platform/Deeploy/pull/159)
- Deeploy-GAP9 Platform [#143](https://github.com/pulp-platform/Deeploy/pull/143)
- Update CLI interface Across Project, Fix Tutorial, and Remove Legacy Test [#157](https://github.com/pulp-platform/Deeploy/pull/157)

### Added
- GAP9 Container Support with ARM64 architecture support
- `zsh` and `oh-my-zsh` plugin installation in containers
- Shell Format pre-commit hook
- Add integer MaxPool1D for Generic platform and RQSConv1D support for PULPOpen, with corresponding kernel tests.
- Added GAP9 Platform Support: Deployer, Bindings, Templates, Tiler, DMA (L3Dma/MchanDma), target library, CI workflows

### Changed
- Cleaned up Docker flow to use a temporary build folder
- Switch CI to use pre-commit for linting
- Update `pulp-nnx` and `pulp-nn-mixed` submodules to their latest versions
- PULP-NN moved to TargetLibraries third-party folder
Expand Down
116 changes: 116 additions & 0 deletions Container/.zshrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# SPDX-FileCopyrightText: 2025 ETH Zurich and University of Bologna
#
# SPDX-License-Identifier: Apache-2.0

# If you come from bash you might have to change your $PATH.
Copy link
Member

Choose a reason for hiding this comment

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

I suggest removing the tutorial comments from this file.

# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH

# Path to your Oh My Zsh installation.
export ZSH="$HOME/.oh-my-zsh"

# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="cypher"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time

# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git)

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
# export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch $(uname -m)"

# Set personal aliases, overriding those provided by Oh My Zsh libs,
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
# users are encouraged to define aliases within a top-level file in
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
# - $ZSH_CUSTOM/aliases.zsh
# - $ZSH_CUSTOM/macos.zsh
# For a full list of active aliases, run `alias`.
#
# Example aliases
alias zshconfig="nano ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

unsetopt HIST_SAVE_BY_COPY
setopt APPEND_HISTORY
setopt SHARE_HISTORY
setopt HIST_IGNORE_ALL_DUPS

# Make sure the gap command of the GAP9 SDK works
unalias gap
Loading
Loading