Merge branch 'graphics' of https://github.com/hansungk/chipyard into graphics
This commit is contained in:
2
.github/actions/prepare-gpu/action.yml
vendored
2
.github/actions/prepare-gpu/action.yml
vendored
@@ -20,6 +20,8 @@ runs:
|
||||
- name: Init submodules to ensure stimuli is located
|
||||
run: |
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-${{ inputs.toolchain }}
|
||||
cd ${{ env.REMOTE_WORK_DIR }}
|
||||
echo $PWD
|
||||
./scripts/init-submodules-no-riscv-tools.sh --force
|
||||
shell: bash -leo pipefail {0}
|
||||
|
||||
|
||||
1
.github/actions/prepare-rtl/action.yml
vendored
1
.github/actions/prepare-rtl/action.yml
vendored
@@ -36,6 +36,7 @@ runs:
|
||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-${{ inputs.toolchain }}
|
||||
if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then
|
||||
echo "Cache miss on ${{ inputs.group-key }}-${{ github.sha }}"
|
||||
echo "Cache miss happened in: $PWD"
|
||||
./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }}
|
||||
else
|
||||
echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}"
|
||||
|
||||
4
.github/scripts/defaults.sh
vendored
4
.github/scripts/defaults.sh
vendored
@@ -11,13 +11,13 @@ REMOTE_MAKE_NPROC=4
|
||||
REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-${GITHUB_REF_NAME//\//-}
|
||||
REMOTE_WORK_DIR=$GITHUB_WORKSPACE
|
||||
REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE
|
||||
REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator
|
||||
REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/vcs
|
||||
REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim
|
||||
REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga
|
||||
|
||||
# local variables (aka within the docker container)
|
||||
LOCAL_CHIPYARD_DIR=$GITHUB_WORKSPACE
|
||||
LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator
|
||||
LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/vcs
|
||||
LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim
|
||||
|
||||
# CI uses temp directories with very long names
|
||||
|
||||
119
.github/workflows/chipyard-gpu-flow.yml
vendored
Normal file
119
.github/workflows/chipyard-gpu-flow.yml
vendored
Normal file
@@ -0,0 +1,119 @@
|
||||
name: chipyard-ci-full-flow-gpu
|
||||
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - graphics
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -leo pipefail {0}
|
||||
|
||||
env:
|
||||
REMOTE_WORK_DIR: ${{ secrets.BUILDDIR }}/cy-ci-shared/cy-${{ github.sha }}
|
||||
JAVA_TMP_DIR: /tmp/cy-${{ github.sha }}-full
|
||||
SSH_AUTH_SOCK: /tmp/ssh_agent_github.sock
|
||||
MAKEFLAGS: "-j32"
|
||||
|
||||
jobs:
|
||||
cancel-prior-workflows:
|
||||
name: cancel-prior-workflows
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cancel Previous Runs
|
||||
uses: styfle/cancel-workflow-action@0.11.0
|
||||
with:
|
||||
access_token: ${{ github.token }}
|
||||
|
||||
# Set up a set of boolean conditions to control which branches of the CI
|
||||
# workflow will execute This is based off the conditional job execution
|
||||
# example here: https://github.com/dorny/paths-filter#examples
|
||||
change-filters:
|
||||
name: filter-jobs-on-changes
|
||||
runs-on: ubuntu-latest
|
||||
# Queried by downstream jobs to determine if they should run.
|
||||
outputs:
|
||||
needs-rtl: ${{ steps.filter.outputs.all_count != steps.filter.outputs.skip-rtl_count }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Git workaround
|
||||
uses: ./.github/actions/git-workaround
|
||||
- uses: dorny/paths-filter@v2
|
||||
id: filter
|
||||
with:
|
||||
filters: |
|
||||
all:
|
||||
- '**'
|
||||
|
||||
# If any of the files changed match, do a doc build
|
||||
docs: &docs-filter
|
||||
- 'docs/**'
|
||||
- '.readthedocs.yml'
|
||||
|
||||
# If all files match to this filter, skip the main ci pipeline
|
||||
skip-rtl:
|
||||
- *docs-filter
|
||||
- '**/*.md'
|
||||
- '**/.gitignore'
|
||||
- '.github/ISSUE_TEMPLATE/**'
|
||||
|
||||
setup-repo:
|
||||
name: setup-repo
|
||||
needs: [change-filters, cancel-prior-workflows]
|
||||
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Delete old checkout
|
||||
run: |
|
||||
ls -alh .
|
||||
rm -rf ${{ github.workspace }}/* || true
|
||||
rm -rf ${{ github.workspace }}/.* || true
|
||||
ls -alh .
|
||||
# note: the agent spun up here will be made available throughout the
|
||||
# workflow via env.SSH_AUTH_SOCK.
|
||||
- name: Run ssh-agent
|
||||
run: |
|
||||
eval `ssh-agent -a $SSH_AUTH_SOCK -s`
|
||||
echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add -
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup repo copy
|
||||
run: |
|
||||
git clone $GITHUB_WORKSPACE ${{ env.REMOTE_WORK_DIR }}
|
||||
- name: Setup repo
|
||||
run: |
|
||||
cd ${{ env.REMOTE_WORK_DIR }}
|
||||
mkdir ${{ env.JAVA_TMP_DIR }}
|
||||
./build-setup.sh -f -v
|
||||
|
||||
run-coalescer:
|
||||
name: run-coalescer
|
||||
needs: [setup-repo]
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Build RTL
|
||||
run: |
|
||||
cd ${{ env.REMOTE_WORK_DIR }}
|
||||
eval "$(conda shell.bash hook)"
|
||||
source env.sh
|
||||
cd sims/verilator
|
||||
make verilog CONFIG=MemtraceCoreConfig
|
||||
- name: Run RTL sim
|
||||
run: |
|
||||
cd ${{ env.REMOTE_WORK_DIR }}
|
||||
eval "$(conda shell.bash hook)"
|
||||
source env.sh
|
||||
cd sims/verilator
|
||||
make run-binary run_binary CONFIG=MemtraceCoreConfig BINARY=none EXTRA_SIM_FLAGS="+memtracefile=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/tracefiles/vecadd.core1.thread4.trace"
|
||||
|
||||
|
||||
cleanup:
|
||||
name: cleanup
|
||||
needs: [run-coalescer]
|
||||
runs-on: self-hosted
|
||||
if: ${{ always() }}
|
||||
steps:
|
||||
- name: Delete repo copy and conda env
|
||||
run: |
|
||||
rm -rf ${{ env.REMOTE_WORK_DIR }}
|
||||
rm -rf ${{ env.JAVA_TMP_DIR }}
|
||||
20
.github/workflows/chipyard-run-tests-gpu.yml
vendored
20
.github/workflows/chipyard-run-tests-gpu.yml
vendored
@@ -12,6 +12,7 @@ defaults:
|
||||
env:
|
||||
tools-cache-version: v17
|
||||
CI_DIR: ${{ secrets.BUILDDIR }}
|
||||
REMOTE_WORK_DIR: ${{ secrets.BUILDDIR }}/cy-ci-shared/cy-${{ github.sha }}
|
||||
JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit
|
||||
conda-env-name-no-time: cy-${{ github.run_id }}
|
||||
workflow-timestamp: ${{ github.event.pull_request.updated_at }}
|
||||
@@ -88,12 +89,29 @@ jobs:
|
||||
- name: Create conda env
|
||||
uses: ./.github/actions/create-conda-env
|
||||
|
||||
setup-repo:
|
||||
name: setup-repo
|
||||
needs: create-conda-env
|
||||
if: needs.change-filters.outputs.needs-rtl == 'true'
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Delete old checkout
|
||||
run: |
|
||||
ls -alh .
|
||||
rm -rf ${{ github.workspace }}/* || true
|
||||
rm -rf ${{ github.workspace }}/.* || true
|
||||
ls -alh .
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup repo copy
|
||||
run: |
|
||||
git clone $GITHUB_WORKSPACE ${{ env.REMOTE_WORK_DIR }}
|
||||
|
||||
# Sentinel job to simplify how we specify which that basic setup is complete
|
||||
#
|
||||
# When adding new prep jobs, please add them to `needs` below
|
||||
setup-complete:
|
||||
name: setup-complete
|
||||
needs: [create-conda-env]
|
||||
needs: setup-repo
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Set up complete
|
||||
|
||||
@@ -46,4 +46,5 @@ SIM_PREPROC_DEFINES = \
|
||||
+define+RANDOMIZE_MEM_INIT \
|
||||
+define+RANDOMIZE_REG_INIT \
|
||||
+define+RANDOMIZE_GARBAGE_ASSIGN \
|
||||
+define+RANDOMIZE_INVALID_ASSIGN
|
||||
+define+RANDOMIZE_INVALID_ASSIGN \
|
||||
$(EXTRA_SIM_PREPROC_DEFINES)
|
||||
|
||||
Reference in New Issue
Block a user