docs: update readme #167
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: HW Synth (Yosys) + PnR (OpenROAD) | |
on: push | |
jobs: | |
changes: | |
uses: ./.github/workflows/filter.yaml | |
nangate45: | |
needs: changes | |
if: ${{ needs.changes.outputs.hardware == 'true' }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
subunit: ["halut_encoder_4", "halut_decoder"] # halut_matmul, fp_16_32_adder | |
container: | |
image: ghcr.io/joennlae/halutmatmul-conda-hw:latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Yosys synth + OpenROAD PnR | |
if: ${{ matrix.subunit != 'fp_16_32_adder' }} | |
run: | | |
source /venv/bin/activate | |
cd hardware | |
ACC_TYPE=INT DATA_WIDTH=8 NUM_M=4 NUM_DECODER_UNITS=2 make halut-open-synth-and-pnr-${{ matrix.subunit }} | |
- name: Yosys synth + OpenROAD PnR | |
if: ${{ matrix.subunit == 'fp_16_32_adder' }} | |
run: | | |
source /venv/bin/activate | |
cd hardware | |
ACC_TYPE=FP32 DATA_WIDTH=16 NUM_M=4 NUM_DECODER_UNITS=2 make halut-open-synth-and-pnr-${{ matrix.subunit }} | |
- name: Copy & save reports | |
run: | | |
cd hardware/target/open-synth-and-pnr/out | |
tar -cvf report.tar.gz ${{ matrix.subunit }} | |
cd .. | |
mkdir -p flow_reports | |
mv out/report.tar.gz flow_reports/${{ matrix.subunit }}.tar.gz | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: nangate45-openroad-report | |
path: hardware/target/open-synth-and-pnr/flow_reports/${{ matrix.subunit }}.tar.gz | |
- name: Pushes current reports to repo | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }} | |
with: | |
source-directory: "hardware/target/open-synth-and-pnr/out/${{ matrix.subunit }}" | |
destination-github-username: "joennlae" | |
destination-repository-name: "halutmatmul-openroad-reports" | |
user-email: [email protected] | |
target-branch: main | |
target-directory: "latest/nangate45/${{ matrix.subunit }}" | |
- name: Get Time | |
id: time | |
uses: nanzm/get-time-action@master | |
with: | |
timeZone: 0 | |
format: "YYYY-MM-DD-HH-mm-ss" | |
- name: Pushes current reports to repo | |
uses: cpina/github-action-push-to-another-repository@main | |
env: | |
SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }} | |
with: | |
source-directory: "hardware/target/open-synth-and-pnr/out" | |
destination-github-username: "joennlae" | |
destination-repository-name: "halutmatmul-openroad-reports" | |
user-email: [email protected] | |
target-branch: main | |
target-directory: "history/nangate45/${{ matrix.subunit }}/${{ steps.time.outputs.time }}/" | |
# needs to much memory so it is run on a large machine (was run) | |
# asap7: | |
# needs: changes | |
# if: ${{ needs.changes.outputs.hardware == 'true' }} | |
# runs-on: ubuntu-latest | |
# concurrency: vast.ai-hw | |
# timeout-minutes: 180 # keep costs in check | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v3 | |
# with: | |
# python-version: "3.9" | |
# - uses: webfactory/[email protected] | |
# with: | |
# ssh-private-key: ${{ secrets.VAST_AI_SSH_KEY }} | |
# - name: Run Synth+PAR OpenROAD on vast.ai servers | |
# run: | | |
# cd .github/vast.ai | |
# pip install requests | |
# ./vast.py set api-key ${{ secrets.VAST_AI_API_KEY }} | |
# mkdir .ssh | |
# python vast_ai_helper.py --hardware --image joennlae/halutmatmul-conda-hw:latest | |
# # scp copy + execution of synth + par is done in vast_ai_helper.py | |
# - uses: webiny/[email protected] | |
# id: cleanup-gpu | |
# name: Cleanup GPU Post | |
# with: | |
# run: | | |
# python vast_ai_helper.py --cleanup --image joennlae/halutmatmul-conda-hw:latest | |
# - name: Untar report | |
# run: | | |
# cd .github/vast.ai | |
# ls | |
# tar -xvf report.tar.gz | |
# - uses: actions/upload-artifact@v3 | |
# with: | |
# name: asap-7-openroad-report | |
# path: flow_reports | |
# - name: Pushes current reports to repo | |
# uses: cpina/github-action-push-to-another-repository@main | |
# env: | |
# SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }} | |
# with: | |
# source-directory: ".github/vast.ai/flow_reports" | |
# destination-github-username: "joennlae" | |
# destination-repository-name: "halutmatmul-openroad-reports" | |
# user-email: [email protected] | |
# target-branch: main | |
# target-directory: "latest/asap7/" | |
# - name: Get Time | |
# id: time | |
# uses: nanzm/[email protected] | |
# with: | |
# timeZone: 0 | |
# format: "YYYY-MM-DD-HH-mm-ss" | |
# - name: Pushes current reports to repo | |
# uses: cpina/github-action-push-to-another-repository@main | |
# env: | |
# SSH_DEPLOY_KEY: ${{ secrets.SSH_AUTOPUSH_KEY }} | |
# with: | |
# source-directory: ".github/vast.ai/flow_reports" | |
# destination-github-username: "joennlae" | |
# destination-repository-name: "halutmatmul-openroad-reports" | |
# user-email: [email protected] | |
# target-branch: main | |
# target-directory: "history/asap7/${{ steps.time.outputs.time }}/" | |
# only needed for asap7 | |
# cleanup: | |
# name: Cleanup check | |
# needs: asap7 | |
# runs-on: ubuntu-latest | |
# concurrency: vast.ai-hw | |
# if: always() | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: actions/setup-python@v3 | |
# with: | |
# python-version: "3.9" | |
# - name: Cleanup Vast.ai instances | |
# run: | | |
# cd .github/vast.ai | |
# pip install requests | |
# ./vast.py set api-key ${{ secrets.VAST_AI_API_KEY }} | |
# python vast_ai_helper.py --cleanup --image joennlae/halutmatmul-conda-hw:latest |