Skip to content

Commit

Permalink
Merge pull request #142 from tum-ei-eda/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
PhilippvK authored Nov 7, 2024
2 parents 11b270b + 03b172b commit 3bb6032
Show file tree
Hide file tree
Showing 259 changed files with 5,684 additions and 448 deletions.
62 changes: 59 additions & 3 deletions .github/workflows/demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,73 @@ jobs:
run: |
source .venv/bin/activate
VERBOSE=${{ github.event.inputs.verbose }} PROGRESS=${{ github.event.inputs.progress }} CCACHE=${{ matrix.ccache }} CLONE_DEPTH=${{ github.event.inputs.clone_depth }} BUILD_CONFIG=${{ github.event.inputs.build_config }} IGNORE_ERROR=${{ github.event.inputs.ignore_error }} TEST=${{ github.event.inputs.test }} INSTALL=${{ github.event.inputs.install }} DEPLOY=${{ github.event.inputs.deploy }} EXPORT=${{ github.event.inputs.export }} DEST=/tmp/seal5_llvm ${{ steps.ctx.outputs.program }} examples/${{ github.event.inputs.script }}
- uses: actions/upload-artifact@v4
- name: Generate Reports
run: |
source .venv/bin/activate
mkdir reports/
# Properties
python3 -m seal5.backends.report.properties.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --output reports/properties.csv
python3 -m seal5.backends.report.properties.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --output reports/properties.md
echo "### Properties" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/properties.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Status
python3 -m seal5.backends.report.status.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --cols2rows --output reports/status.csv
python3 -m seal5.backends.report.status.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --cols2rows --output reports/status.md --markdown-icons
echo "### Status" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/status.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Test Results
python3 -m seal5.backends.report.test_results.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/test_results.csv
python3 -m seal5.backends.report.test_results.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/test_results.md --markdown-icons
echo "### Test Results" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/test_results.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Diff
python3 -m seal5.backends.report.diff.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/diff.csv
python3 -m seal5.backends.report.diff.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/diff.md
echo "### Diff" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/diff.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Stage Times
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.csv --sum-level 2
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.md --sum-level 2
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.mermaid --aum-level 2
echo "### Stage/Pass Times" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/stage_times.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`mermaid" >> $GITHUB_STEP_SUMMARY
cat reports/stage_times.mermaid >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Upload Seal5 Reports
uses: actions/upload-artifact@v4
with:
name: demo-reports
path: reports/
- name: Upload Seal5 Metadata
uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.export == '1' }}"
with:
name: demo-export
path: /tmp/seal5_llvm.tar.gz
- uses: actions/upload-artifact@v4
- name: Upload Seal5 LLVM Installation
uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.install == '1' }}"
with:
name: demo-install
path: /tmp/seal5_llvm/.seal5/install/${{ github.event.inputs.build_config }}
- uses: actions/upload-artifact@v4
- name: Upload Seal5 LLVM Sources
uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.deploy == '1' }}"
with:
name: demo-source
Expand Down
62 changes: 59 additions & 3 deletions .github/workflows/demo_weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,73 @@ jobs:
run: |
source .venv/bin/activate
VERBOSE=${{ matrix.verbose }} PROGRESS=${{ matrix.progress }} CCACHE=${{ matrix.ccache }} CLONE_DEPTH=${{ matrix.clone_depth }} BUILD_CONFIG=${{ matrix.build_config }} IGNORE_ERROR=${{ matrix.ignore_error }} TEST=${{ matrix.test }} INSTALL=${{ matrix.install }} DEPLOY=${{ matrix.deploy }} EXPORT=${{ matrix.export }} DEST=/tmp/seal5_llvm ${{ steps.ctx.outputs.program }} examples/${{ matrix.script }}
- uses: actions/upload-artifact@v4
- name: Generate Reports
run: |
source .venv/bin/activate
mkdir reports/
# Properties
python3 -m seal5.backends.report.properties.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --output reports/properties.csv
python3 -m seal5.backends.report.properties.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --output reports/properties.md
echo "### Properties" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/properties.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Status
python3 -m seal5.backends.report.status.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --cols2rows --output reports/status.csv
python3 -m seal5.backends.report.status.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --cols2rows --output reports/status.md --markdown-icons
echo "### Status" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/status.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Test Results
python3 -m seal5.backends.report.test_results.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/test_results.csv
python3 -m seal5.backends.report.test_results.writer /tmp/seal5_llvm/.seal5/models/*.seal5model --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/test_results.md --markdown-icons
echo "### Test Results" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/test_results.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Diff
python3 -m seal5.backends.report.diff.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/diff.csv
python3 -m seal5.backends.report.diff.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --output reports/diff.md
echo "### Diff" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/diff.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
# Stage Times
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.csv --sum-level 2
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.md --sum-levrl 2
python3 -m seal5.backends.report.times.writer --yaml /tmp/seal5_llvm/.seal5/settings.yml --pass-times --output reports/stage_times.mermaid --sum-level 2
echo "### Stage/Pass Times" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
cat reports/stage_times.md >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`mermaid" >> $GITHUB_STEP_SUMMARY
cat reports/stage_times.mermaid >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Upload Seal5 Reports
uses: actions/upload-artifact@v4
with:
name: demo-${{ steps.ctx.outputs.name }}-reports
path: reports/
- name: Upload Seal5 Metadata
uses: actions/upload-artifact@v4
if: "${{ matrix.export == '1' }}"
with:
name: demo-${{ steps.ctx.outputs.name }}-export
path: /tmp/seal5_llvm.tar.gz
- uses: actions/upload-artifact@v4
- name: Upload Seal5 LLVM Installation
uses: actions/upload-artifact@v4
if: "${{ matrix.install == '1' }}"
with:
name: demo-${{ steps.ctx.outputs.name }}-install
path: /tmp/seal5_llvm/.seal5/install/${{ matrix.build_config }}
- uses: actions/upload-artifact@v4
- name: Upload Seal5 LLVM Sources
uses: actions/upload-artifact@v4
if: "${{ matrix.deploy == '1' }}"
with:
name: demo-${{ steps.ctx.outputs.name }}-source
Expand Down
163 changes: 163 additions & 0 deletions .github/workflows/seal5_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
##
## Copyright (c) 2024 TUM Department of Electrical and Computer Engineering.
##
## This file is part of Seal5.
## See https://github.com/tum-ei-eda/seal5.git for further info.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##

# Seal5 demonstration (also serves as end-to-end testj
name: Usage Seal5-Build

on:
repository_dispatch:
types: [s4e-cdsl-event]
workflow_dispatch:
inputs:
script:
description: "Script"
required: true
default: "s4e_demo.py"
verbose:
description: "Verbose (0/1)"
required: true
default: "0"
progress:
description: "Enable progress bars (0/1)"
required: true
default: "1"
clone_depth:
description: "Clone Depth (-1 for full clone)"
required: true
default: "1"

ignore_error:
description: "Ignore Errors in TEST stage (0/1)"
required: true
default: "1"
build_config:
description: "Build Config (debug/release/...)"
required: true
default: "release_assertions"
test:
description: "Run LLVM tests"
required: true
default: "1"
install:
description: "Install LLVM (and upload as artifact)"
required: true
default: "1"
deploy:
description: "Install LLVM Sources (and upload as artifact)"
required: true
default: "1"
export:
description: "Install Seal5 Artifacts (and upload as artifact)"
required: true
default: "1"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
build_seal5:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.10"]
os: ["ubuntu-latest"]
ccache: ["1"]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup ccache
if: ${{ matrix.ccache == '1' }}
uses: hendrikmuhs/ccache-action@v1
with:
max-size: 2G
key: ${{ matrix.os }}-${{ github.event.inputs.script }}-${{ github.event.inputs.build_config }}
variant: sccache
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install APT packages
run: |
sudo apt -qq install -y python3-pip python3-venv cmake make ninja-build
- name: Initialize Virtualenv
run: |
python -m pip install --upgrade pip
python -m venv .venv
- name: Install dependencies
run: |
source .venv/bin/activate
pip install -r requirements.txt
pip list
- name: Setup Build Environment
run: |
source .venv/bin/activate
pip install -e .
- name: Run the demo
run: |
source .venv/bin/activate
VERBOSE=0 PROGESS=1 CLONE_DEPTH=1 CCACHE=${{ matrix.ccache }} BUILD_CONFIG=release IGNORE_ERROR=1 TEST=1 INSTALL=1 DEPLOY=1 EXPORT=1 DEST=/tmp/seal5_llvm python3 examples/s4e_demo.py
- uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.export == '1' || github.event_name == 'repository_dispatch' }}"
with:
name: demo-export
path: /tmp/seal5_llvm.tar.gz

- uses: actions/upload-artifact@v4
if: "${{ github.event.inputs.install == '1' || github.event_name == 'repository_dispatch' }}"
with:
name: demo-install
path: /tmp/seal5_llvm/.seal5/install/${{ github.event.inputs.build_config }}

trigger_etiss_example_build:
runs-on: ubuntu-latest
needs: build_seal5
steps:
- name: Download ETISS RUN-ID Artifacts
id: download-artifact
uses: dawidd6/action-download-artifact@v6
with:
name: etiss-run-id
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
repository: tum-ei-eda/seal5
path: /home/runner/work/
workflow: sync_etiss_seal5_build.yml
workflow_conclusion: success

- name: Set ETISS RUN-ID as Variable
shell: bash
run: |
ETISS_RUN_ID=$(cat /home/runner/work/etiss-run-id.txt)
echo "ETISS_RUN_ID=$ETISS_RUN_ID" >> $GITHUB_ENV
echo ${{ env.ETISS_RUN_ID }}
echo $ETISS_RUN_ID
- name: Trigger ETISS-RISCV-EXAMPLE Build
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
repository: tum-ei-eda/etiss_riscv_examples
event-type: seal5-event
client-payload: '{"triggered_run_id": "${{ github.run_id }}", "etiss_run_id": "${{ env.ETISS_RUN_ID }}"}'




35 changes: 35 additions & 0 deletions .github/workflows/sync_etiss_seal_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Sync ETISS Build

on:
repository_dispatch:
types: [ etiss-event ]

jobs:
Get-ETISS-Build-Status:
runs-on: ubuntu-latest
steps:

- name: Get ETISS Build Run-ID & Run-Result
run: |
echo ' ETISS RUN-ID:' ${{ github.event.client_payload.etiss_run_id }}
echo ' ETISS PARENT RUN-ID:' ${{ github.event.client_payload.parent_repo_run_id }}
echo ' SEAL5 RUN-ID:' ${{ github.event.client_payload.trigger_repo_run_id }}
echo ${{ github.event.client_payload.etiss_run_id }} > etiss-run-id.txt
- name: Upload compiled ETISS
uses: actions/upload-artifact@v4
with:
name: etiss-run-id
path: etiss-run-id.txt

- name: Download ETISS RISCV Examples Artifact
uses: actions/download-artifact@v4
with:
name: etiss-run-id
github-token: ${{ secrets.SEAL5_ACCESS_TOKEN }}
path: /home/runner/work/

- name: Print out ID
run: |
cat /home/runner/work/etiss-run-id.txt
22 changes: 17 additions & 5 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# Seal5 Supported Instructions
# Compatibility

## Core-V Extensions
## Supported LLVM Versions

### Legend
| **Seal5** | **LLVM 17** | **LLVM 18** | **LLVM 19** | **Comment** |
|-----------------------|---------------------------------------|-------------------------------------------|---------------------------------------|------------------|
| `v0.1.0` | :white_check_mark: (`llvmorg-17.0.6`) | :x: | :x: | Limited support! |
| `v0.1.1` ... `v0.1.4` | :question: | :white_check_mark: (`llvmorg-18.1.0-rc3`) | :x: | |
| `TODO` | :question: | :question: | :white_check_mark: (`llvmorg-19.1.3`) | To be released! |

_(Last updated: 30.10.2024)_

## Supported Instructions

### Core-V Extensions

**Legend**

```
y: yes
Expand All @@ -13,15 +25,15 @@ f: filtered/excluded
?: unknown
```

### Notes
**Notes**

```
^1: commented out
^2: not planned/too specific
^3: due to tablegen freeze
```

### Table
**Table**

| Mnemonic | Extension | Group | Sub-Group | CDSL written? | Assembly support | Intrinsics support | Patterns support | Assembly tests | Intrinsics tests | Codegen tests |
|----------------------------------|------------|-------------------------|-----------------------------------------------|---------------|------------------|--------------------|------------------|----------------|------------------|---------------|
Expand Down
Loading

0 comments on commit 3bb6032

Please sign in to comment.