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
41 changes: 0 additions & 41 deletions .github/workflows/BuildDocker.yml

This file was deleted.

126 changes: 126 additions & 0 deletions .github/workflows/BuildDockerDeeploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: BuildDockerDeeploy

on:
workflow_dispatch:
inputs:
docker_image_toolchain:
description: 'Deeploy Toolchain Image to use'
required: false
default: 'ghcr.io/pulp-platform/deeploy-toolchain: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:
name: Build Deploy Image
needs: [ prepare ]
runs-on: ${{ matrix.runner }}
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:
android: true
dotnet: true
haskell: true
large-packages: true

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

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

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

- 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: Build and push final deploy image
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
push: true
build-args: |
BASE_IMAGE=${{ github.event.inputs.docker_image_toolchain }}
tags: |
ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-${{ matrix.platform }}
ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}

merge-deeploy-images:
name: Merge Deeploy Images
runs-on: ubuntu-latest
needs: [ prepare, build-deeploy ]
steps:
- name: GHCR Log-in
uses: docker/login-action@v1
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 }}'

- uses: Noelware/docker-manifest-action@v1
with:
inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy:latest-arm64
tags: ghcr.io/${{ env.OWNER_LC }}/deeploy:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy:${{ needs.prepare.outputs.docker_tag }}
push: true
117 changes: 117 additions & 0 deletions .github/workflows/BuildDockerToolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: BuildDockerToolchain

on:
workflow_dispatch:

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-toolchain:
name: Build Deeploy Toolchain Image
needs: [ prepare ]
runs-on: ${{ matrix.runner }}
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@v2

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

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

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

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

- 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: Build and push toolchain image
uses: docker/build-push-action@v6
with:
platforms: linux/${{ matrix.platform }}
context: .
file: Container/Dockerfile.toolchain
push: true
tags: |
ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-${{ matrix.platform }}
ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }}-${{ matrix.platform }}

merge-toolchain-images:
name: Merge Deeploy Toolchain Images
runs-on: ubuntu-latest
needs: [ prepare, build-toolchain ]
steps:
- name: GHCR Log-in
uses: docker/login-action@v1
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 }}'

- uses: Noelware/docker-manifest-action@v1
with:
inputs: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-amd64,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest-arm64
tags: ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:latest,ghcr.io/${{ env.OWNER_LC }}/deeploy-toolchain:${{ needs.prepare.outputs.docker_tag }}
push: true
7 changes: 6 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ on:
push:
pull_request:
workflow_dispatch:
inputs:
docker_image_deeploy:
description: 'Deeploy Image to use'
required: false
default: 'ghcr.io/pulp-platform/deeploy:main'
schedule:
# Runs the CI on the default branch every 6 days at 2AM CET to keep the cache fresh
- cron: "0 1 */6 * *"

env:
DOCKER_IMAGE: ghcr.io/pulp-platform/deeploy:main
DOCKER_IMAGE: ${{ github.event.inputs.docker_image_deeploy || 'ghcr.io/pulp-platform/deeploy:main' }}

jobs:

Expand Down
27 changes: 2 additions & 25 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Generic Platform Adder",
"type": "debugpy",
"request": "launch",
"justMyCode": false,
"program": "generateNetwork.py",
"cwd": "${workspaceFolder}/DeeployTest",
"args": [
"-t",
"Tests/Adder",
"-p",
"Generic"
]
},
{
"name": "Deeploy Generate Untiled",
"type": "debugpy",
Expand All @@ -26,12 +12,7 @@
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/DeeployTest",
"justMyCode": false,
"args": [
"-v",
"-p${input:platformUntiled}",
"-t${input:model}",
"${input:additionalArgsUntiled}"
]
"args": "-p${input:platformUntiled} -t${input:model} ${input:additionalArgsUntiled}"
},
{
"name": "Deeploy Generate Tiled",
Expand All @@ -41,11 +22,7 @@
"console": "integratedTerminal",
"cwd": "${workspaceFolder}/DeeployTest",
"justMyCode": false,
"args": [
"-p${input:platformTiled}",
"-t${input:model}",
"${input:additionalArgsTiled}"
]
"args": "-p${input:platformTiled} -t${input:model} ${input:additionalArgsTiled}"
}
],
"inputs": [
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

## Unreleased

## ARM Docker Container and Minor Bug Fix
### Added
- `BuildDockerToolchain.yml` to build Toolchain Docker container
- `BuildDockerDeeploy.yml` to build Deeploy Docker container
- Add support for `linux/arm64` containers
- Added caching to speed up container builds
- Makefile to simplify local container build

### Changed
- Split the original build flow into two container

### Fixed
- Fixed broken VSCode launch configuration
- Fixed broken `pulp-sdk` hash
- Fix issue with building `banshee` on `linux/arm

## Autoselect Self-Hosted Runners if the Action runs on Upstream

### Changed
Expand Down Expand Up @@ -238,14 +254,14 @@ Change main.c to use OUTPUTTYPE instead of float

## Add MiniMalloc and Decouple Memory Allocation and Tiling

## Added
### Added
- Installation and compilation flow for MiniMalloc through Makefile.
- Adapt the docker to install MiniMalloc and declare necessary symbols.
- Add the `constraintTileBuffersWithOverlappingLifetime` method to the memory scheduler to add the necessary memory constraint when we decouple memory allocation and tiling.
- Add the `minimalloc` method to the `Tiler` class. MiniMalloc comes as a precompiled cpp library using CSV for I/O. Hence, this method converts Deeploy's memory map to MiniMalloc's CSV representation, calls a subprocess to run MiniMalloc, reads the output CSV, and translates it back to Deeploy's memory map.
- Add MiniMalloc to the memory allocation strategies and add a new argument to the test runner to control the L2 size.

## Fixed
### Fixed
- Fix `testMVP.py` to get a proper should fail test.

## Implemented Quant Layer for Generic and Siracusa
Expand Down
Loading
Loading