Add support for grouped convolution #450
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: Validate | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CI: 1 | |
CARGO_TERM_COLOR: always | |
RENODE_DIR: /opt/renode/ | |
# Used by renode-test to generate snapshots of failed tests | |
RENODE_CI_MODE: YES | |
DLA_BIN: dla | |
DLA_VALIDATION_BIN: validate | |
# Cancel any currently running workflows from the same PR, branch, or | |
# tag when a new workflow is triggered. | |
# | |
# https://stackoverflow.com/a/67939898 | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
check-bsp: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: -D warnings | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install requirements | |
run: | | |
rustup update | |
rustup target add riscv64imac-unknown-none-elf riscv32im-unknown-none-elf | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./examples/headsail-bsp" | |
- name: Run linter | |
working-directory: ./examples/headsail-bsp | |
run: cargo clippy -- -D clippy::style | |
- name: Check BSP (-Fsysctrl-rt) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check -Fsysctrl-rt | |
- name: Check BSP (-Fsysctrl-rt -Fvp) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check -Fsysctrl-rt -Fvp | |
- name: Check BSP examples (-Fsysctrl-rt) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check --examples -Fsysctrl-rt -Fpanic-apb-uart0 | |
- name: Check BSP examples (-Fsysctrl-rt -Fvp) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check --examples -Fsysctrl-rt -Fvp -Fpanic-apb-uart0 | |
- name: Check BSP (-Fhpc-rt) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check -Fhpc-rt | |
- name: Check BSP (-Fhpc-rt -Fvp) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check -Fhpc-rt -Fvp | |
- name: Check BSP examples (-Fhpc-rt) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check --examples -Fhpc-rt -Fpanic-apb-uart0 | |
- name: Check BSP examples (-Fhpc-rt -Fvp) | |
working-directory: ./examples/headsail-bsp | |
run: cargo check --examples -Fhpc-rt -Fvp -Fpanic-apb-uart0 | |
build-dla-example: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install requirements | |
run: | | |
rustup update | |
rustup target add riscv64imac-unknown-none-elf | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./examples/hpc/" | |
- name: Run linter | |
working-directory: ./examples/hpc/ | |
run: cargo clippy -- -D clippy::style | |
- name: Build examples | |
working-directory: ./examples/hpc/hello-dla | |
run: cargo build --example dla | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: $DLA_BIN | |
path: ./examples/hpc/target/riscv64imac-unknown-none-elf/debug/examples/dla | |
if-no-files-found: error | |
retention-days: 14 | |
run-dla-example: | |
needs: build-dla-example | |
runs-on: ubuntu-latest | |
container: | |
image: antmicro/renode:1.14.0 | |
options: --user root | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: $DLA_BIN | |
- name: Create Renode peripheral symlinks | |
run: ln -s $(readlink -f "./vp/devel/python_peripherals/DLA.py") "$RENODE_DIR/scripts/pydev/DLA.py" | |
- name: Run example | |
run: renode-test scripts/robot/is_hello.robot --variable BIN:"$(readlink -f $DLA_BIN)" | |
- name: Upload snapshots | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
path: snapshots/ | |
build-dla-validation: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
env: | |
RISCV: /opt/riscv/ | |
GCC_VER: "2024.04.12" | |
RISCV_XLEN: riscv64 | |
UBUNTU_VER: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create RISC-V GCC build directory | |
shell: bash | |
run: mkdir /tmp/riscv-gnu-toolchain | |
- name: Download GCC | |
working-directory: /tmp/riscv-gnu-toolchain/ | |
run: | | |
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/$GCC_VER/$RISCV_XLEN-elf-$UBUNTU_VER-gcc-nightly-$GCC_VER-nightly.tar.gz | |
mkdir ${RISCV} && \ | |
tar -xf $RISCV_XLEN-elf-$UBUNTU_VER-gcc-nightly-$GCC_VER-nightly.tar.gz --strip-components 1 -C $RISCV | |
export PATH="${RISCV}"/bin:${PATH} | |
echo "${RISCV}/bin" >> $GITHUB_PATH | |
$RISCV_XLEN-unknown-elf-gcc --version | |
$RISCV_XLEN-unknown-elf-ld --version | |
- name: Install rustup target | |
run: rustup target add riscv64imac-unknown-none-elf | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./examples/hpc" | |
- name: Build validation | |
working-directory: ./examples/hpc/dla-driver | |
run: cargo build --example validate -Fvp -Fhpc --target riscv64imac-unknown-none-elf | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: $DLA_VALIDATION_BIN | |
path: ./examples/hpc/target/riscv64imac-unknown-none-elf/debug/examples/validate | |
if-no-files-found: error | |
retention-days: 14 | |
run-dla-validation: | |
needs: build-dla-validation | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
container: | |
image: antmicro/renode:1.14.0 | |
options: --user root | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: $DLA_VALIDATION_BIN | |
- name: Install python dependencies | |
run: pip install -r ./scripts/robot/requirements.txt | |
- name: Create Renode peripheral symlinks | |
run: ln -s $(readlink -f "./vp/devel/python_peripherals/DLA.py") "$RENODE_DIR/scripts/pydev/DLA.py" | |
- name: Run dla validation | |
run: renode-test ./scripts/robot/dla_validate.robot --variable BIN:"$(readlink -f $DLA_VALIDATION_BIN)" | |
- name: Upload snapshots | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
path: snapshots/ | |
build-ffi: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install requirements | |
run: | | |
rustup update | |
rustup target add riscv64imac-unknown-none-elf riscv32im-unknown-none-elf | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: "./examples/headsail-bsp-ffi" | |
- name: Build FFI without RT on SysCtrl | |
working-directory: ./examples/headsail-bsp-ffi | |
run: cargo build --target=riscv32im-unknown-none-elf -Fpanic-apb-uart0 | |
- name: Build FFI without RT on HPC | |
working-directory: ./examples/headsail-bsp-ffi | |
run: cargo build --target=riscv64imac-unknown-none-elf -Fpanic-apb-uart0 |