Skip to content

Commit

Permalink
Merge pull request #20 from pulp-platform/yt/ci-1
Browse files Browse the repository at this point in the history
Add CI flow.
  • Loading branch information
yvantor authored Mar 11, 2024
2 parents 4b74428 + de14d8f commit 84b976d
Show file tree
Hide file tree
Showing 79 changed files with 1,316 additions and 9,166 deletions.
10 changes: 10 additions & 0 deletions .github/verible.waiver
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2022 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

# Disable line length check
waive --rule=line-length
# Disable parameter style check
waive --rule=parameter-name-style
# Disable default check in case statements
waive --rule=case-missing-default
25 changes: 25 additions & 0 deletions .github/workflows/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2022 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: gitlab-ci

on: [ push, pull_request, workflow_dispatch ]

jobs:

check:
runs-on: ubuntu-latest
steps:
-
name: Mirror and check
uses: pulp-platform/pulp-actions/gitlab-ci@v2
# Skip on forks or pull requests from forks due to missing secrets.
if: >
github.repository == 'pulp-platform/redmule' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
with:
domain: iis-git.ee.ethz.ch
repo: github-mirror/redmule
token: ${{ secrets.GITLAB_TOKEN }}
77 changes: 77 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Copyright 2022 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

name: lint

on: [ push, pull_request, workflow_dispatch ]

jobs:

lint-license:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Check license
uses: pulp-platform/pulp-actions/lint-license@v2
with:
license: |
Copyright (\d{4}(-\d{4})?\s)?.*
(Solderpad Hardware License, Version 0.51|Licensed under the Apache License, Version 2.0), see LICENSE for details.
SPDX-License-Identifier: (SHL-0.51|Apache-2.0)
# Exclude generated headers (no license checker support for optional lines)
exclude_paths: |
sw/utils/tinyprintf.h
sw/inc/*
*.md
*.do
*.lock
LICENSE*
lint-sv:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Verible
uses: chipsalliance/verible-linter-action@main
with:
paths: rtl
exclude_paths: |
rtl/redmule_noncomp.sv
rtl/redmule_fma.sv
extra_args: "--waiver_files .github/verible.waiver"
github_token: ${{ secrets.GITHUB_TOKEN }}
fail_on_error: true
reviewdog_reporter: github-check

lint-cxx:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Run Clang-format
uses: DoozyX/[email protected]
with:
extensions: 'c,h,cpp'
clangFormatVersion: 14
style: >
{
IndentWidth: 2,
ColumnLimit: 100,
AlignEscapedNewlines: DontAlign,
SortIncludes: false,
AllowShortFunctionsOnASingleLine: true,
AllowShortIfStatementsOnASingleLine: true,
AllowShortLoopsOnASingleLine: true
}
exclude: |
./sw/inc/*
./sw/utils/tinyprintf.h
120 changes: 120 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Copyright 2022 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Yvan Tortorella <[email protected]>

.base:
artifacts:
when: always
expire_in: 1 week

stages:
- init
- build
- test

init:
stage: init
extends: .base
script:
- cd golden-model; source setup-py.sh
artifacts:
when: always
expire_in: 1 week
paths:
- ./golden-model/venv

.redmule-build-tpl:
extends: .base
stage: build
dependencies:
- init
script:
- SETUP_CONFIG=${SETUP_CONFIG}
- source scripts/${SETUP_CONFIG}.sh
- make update-ips
- make hw-build
artifacts:
when: always
expire_in: 1 week
paths:
- ./.bender
- ./scripts/compile.tcl
- ./vsim/*

redmule-build-hwpe:
extends: .redmule-build-tpl
variables:
SETUP_CONFIG: "setup-hwpe"

redmule-build-complex:
extends: .redmule-build-tpl
variables:
SETUP_CONFIG: "setup-complex"

.redmule-vsim-tpl:
extends: .base
stage: test
script:
- SETUP_CONFIG=${SETUP_CONFIG}
- source scripts/${SETUP_CONFIG}.sh
- make golden OP=${OP} M=${M} N=${N} K=${K} fp_fmt=${FMT}
- make sw-clean sw-build
- make run
- '(grep -rn "Success!" ./vsim/transcript)'
- (! grep -rn "Fail!" ./vsim/transcript)

hwpe-test:
extends: .redmule-vsim-tpl
dependencies:
- redmule-build-hwpe
variables:
SETUP_CONFIG: "setup-hwpe"
parallel:
matrix:
- { OP: gemm, M: 96, N: 96, K: 96, FMT: FP16 }
- { OP: gemm, M: 128, N: 128, K: 128, FMT: FP16 }
- { OP: gemm, M: 12, N: 16, K: 16, FMT: FP16 }
- { OP: gemm, M: 24, N: 16, K: 16, FMT: FP16 }
- { OP: gemm, M: 48, N: 32, K: 32, FMT: FP16 }
- { OP: gemm, M: 30, N: 32, K: 17, FMT: FP16 }
- { OP: gemm, M: 24, N: 32, K: 1, FMT: FP16 }
- { OP: gemm, M: 31, N: 32, K: 16, FMT: FP16 }
- { OP: gemm, M: 17, N: 32, K: 16, FMT: FP16 }
- { OP: gemm, M: 31, N: 32, K: 31, FMT: FP16 }
- { OP: gemm, M: 17, N: 32, K: 3, FMT: FP16 }
- { OP: gemm, M: 5, N: 32, K: 17, FMT: FP16 }
- { OP: gemm, M: 5, N: 32, K: 3, FMT: FP16 }
- { OP: gemm, M: 36, N: 31, K: 32, FMT: FP16 }
- { OP: gemm, M: 12, N: 31, K: 16, FMT: FP16 }
- { OP: gemm, M: 23, N: 31, K: 31, FMT: FP16 }
- { OP: gemm, M: 24, N: 17, K: 32, FMT: FP16 }
- { OP: gemm, M: 24, N: 20, K: 32, FMT: FP16 }

complex-test:
extends: .redmule-vsim-tpl
dependencies:
- redmule-build-complex
variables:
SETUP_CONFIG: "setup-complex"
parallel:
matrix:
- { OP: gemm, M: 96, N: 96, K: 96, FMT: FP16 }
- { OP: gemm, M: 128, N: 128, K: 128, FMT: FP16 }
- { OP: gemm, M: 12, N: 16, K: 16, FMT: FP16 }
- { OP: gemm, M: 24, N: 16, K: 16, FMT: FP16 }
- { OP: gemm, M: 48, N: 32, K: 32, FMT: FP16 }
- { OP: gemm, M: 30, N: 32, K: 17, FMT: FP16 }
- { OP: gemm, M: 24, N: 32, K: 1, FMT: FP16 }
- { OP: gemm, M: 31, N: 32, K: 16, FMT: FP16 }
- { OP: gemm, M: 17, N: 32, K: 16, FMT: FP16 }
- { OP: gemm, M: 31, N: 32, K: 31, FMT: FP16 }
- { OP: gemm, M: 17, N: 32, K: 3, FMT: FP16 }
- { OP: gemm, M: 5, N: 32, K: 17, FMT: FP16 }
- { OP: gemm, M: 5, N: 32, K: 3, FMT: FP16 }
- { OP: gemm, M: 36, N: 31, K: 32, FMT: FP16 }
- { OP: gemm, M: 12, N: 31, K: 16, FMT: FP16 }
- { OP: gemm, M: 23, N: 31, K: 31, FMT: FP16 }
- { OP: gemm, M: 24, N: 17, K: 32, FMT: FP16 }
- { OP: gemm, M: 24, N: 20, K: 32, FMT: FP16 }
7 changes: 7 additions & 0 deletions Bender.local
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Yvan Tortorella <[email protected]>
#

overrides:
fpnew: { git: "https://github.com/pulp-platform/cvfpu.git", rev: "pulp-v0.1.3" }
8 changes: 4 additions & 4 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ packages:
dependencies:
- common_cells
hci:
revision: 0c67be238169209e3c89f6dd577496db1cf9cc88
revision: 4823e503851eb7e8cc765a58621d767a01d6a77b
version: null
source:
Git: https://github.com/pulp-platform/hci.git
Expand All @@ -60,15 +60,15 @@ packages:
- hwpe-stream
- l2_tcdm_hybrid_interco
hwpe-ctrl:
revision: c35d5b0886ab549fb9144c3c14a4682112330e21
revision: 0e95510c0f4d43452d21b7723d766ae92e45c101
version: null
source:
Git: https://github.com/pulp-platform/hwpe-ctrl.git
dependencies:
- tech_cells_generic
hwpe-stream:
revision: ddc154424187dff42a8fcec946c768ceb13f13de
version: 1.6.4
revision: 4c2ef8c33a6e2a8c88127e2153013d4f2dc3f448
version: 1.7.0
source:
Git: https://github.com/pulp-platform/hwpe-stream.git
dependencies:
Expand Down
24 changes: 7 additions & 17 deletions Bender.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# Copyright (C) 2022-2023 ETH Zurich and University of Bologna
#
# 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.
# Copyright 2023 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
#
# Author: Yvan Tortorella ([email protected])
# Yvan Tortorella <[email protected]>
#
# Bender manifest

Expand All @@ -25,9 +15,9 @@ dependencies:
cv32e40p : { git: "https://github.com/pulp-platform/cv32e40p.git" , rev: "pulpissimo-v4.1.0" }
cv32e40x : { git: "https://github.com/pulp-platform/cv32e40x.git" , rev: "redmule-v1.0" }
ibex : { git: "https://github.com/pulp-platform/ibex.git" , rev: pulpissimo-v6.1.2 }
hwpe-stream : { git: "https://github.com/pulp-platform/hwpe-stream.git" , version: 1.6 }
hwpe-ctrl : { git: "https://github.com/pulp-platform/hwpe-ctrl.git" , rev: c35d5b0886ab549fb9144c3c14a4682112330e21 } # branch: yt/reqrsp
hci : { git: "https://github.com/pulp-platform/hci.git" , rev: 0c67be238169209e3c89f6dd577496db1cf9cc88 } # branch: yt/reqrsp
hwpe-stream : { git: "https://github.com/pulp-platform/hwpe-stream.git" , version: 1.7 }
hwpe-ctrl : { git: "https://github.com/pulp-platform/hwpe-ctrl.git" , rev: 0e95510c0f4d43452d21b7723d766ae92e45c101 } # branch: yt/task-interfaces
hci : { git: "https://github.com/pulp-platform/hci.git" , rev: v1.1 }
fpnew : { git: "https://github.com/pulp-platform/cvfpu.git" , rev: "pulp-v0.1.3" }
common_cells : { git: "https://github.com/pulp-platform/common_cells.git" , version: 1.21.0 }
tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.11 }
Expand Down
Loading

0 comments on commit 84b976d

Please sign in to comment.