Skip to content

Commit

Permalink
[ci] fix subsystem run in ci
Browse files Browse the repository at this point in the history
- specify test lists for subsystem in individual file
- move subsystem build to better machine

Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Feb 3, 2024
1 parent e6e31c8 commit 7faef50
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 15 deletions.
17 changes: 17 additions & 0 deletions .github/cases/v1024-l8-b2-fp/subsystem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"rvv-vp-intrinsic-add-mlir": 291,
"rvv-vp-intrinsic-add-scalable-mlir": 448,
"hello-mlir": 72,
"stripmining-mlir": 23635,
"conv2d-less-m2-intrinsic": 27600,
"linear-normalization-intrinsic": 0,
"matmul-intrinsic": 0,
"softmax-intrinsic": 0,
"uarttest-intrinsic": 0,
"fpsmoke-asm": 0,
"memcpy-asm": 0,
"mmm-asm": 61401,
"smoke-asm": 7539,
"strlen-asm": 0,
"utf8-count-asm": 0
}
17 changes: 17 additions & 0 deletions .github/cases/v1024-l8-b2/subsystem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"rvv-vp-intrinsic-add-mlir": 291,
"rvv-vp-intrinsic-add-scalable-mlir": 448,
"hello-mlir": 72,
"stripmining-mlir": 23635,
"conv2d-less-m2-intrinsic": 27600,
"linear-normalization-intrinsic": 0,
"matmul-intrinsic": 0,
"softmax-intrinsic": 0,
"uarttest-intrinsic": 0,
"fpsmoke-asm": 0,
"memcpy-asm": 0,
"mmm-asm": 61401,
"smoke-asm": 7539,
"strlen-asm": 0,
"utf8-count-asm": 0
}
17 changes: 17 additions & 0 deletions .github/cases/v4096-l8-b4-fp/subsystem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"rvv-vp-intrinsic-add-mlir": 291,
"rvv-vp-intrinsic-add-scalable-mlir": 448,
"hello-mlir": 72,
"stripmining-mlir": 23635,
"conv2d-less-m2-intrinsic": 27600,
"linear-normalization-intrinsic": 0,
"matmul-intrinsic": 0,
"softmax-intrinsic": 0,
"uarttest-intrinsic": 0,
"fpsmoke-asm": 0,
"memcpy-asm": 0,
"mmm-asm": 61401,
"smoke-asm": 7539,
"strlen-asm": 0,
"utf8-count-asm": 0
}
17 changes: 17 additions & 0 deletions .github/cases/v4096-l8-b4/subsystem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"rvv-vp-intrinsic-add-mlir": 291,
"rvv-vp-intrinsic-add-scalable-mlir": 448,
"hello-mlir": 72,
"stripmining-mlir": 23635,
"conv2d-less-m2-intrinsic": 27600,
"linear-normalization-intrinsic": 0,
"matmul-intrinsic": 0,
"softmax-intrinsic": 0,
"uarttest-intrinsic": 0,
"fpsmoke-asm": 0,
"memcpy-asm": 0,
"mmm-asm": 61401,
"smoke-asm": 7539,
"strlen-asm": 0,
"utf8-count-asm": 0
}
21 changes: 9 additions & 12 deletions .github/scripts/ci.sc
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,15 @@ def toMatrixJson(buckets: Seq[String]) =
// Read default tests information from '.github/cases/default.txt' file, and use that information to generate GitHub CI matrix.
// The result will be printed to stdout, and should be pipe into $GITHUB_OUTPUT
@main
def generateCiMatrix(
runnersAmount: Int,
) = {
val defaultCases = os.pwd / os.RelPath(".github/cases/default.txt")
println(toMatrixJson(
scheduleTasks(
os.read
.lines(defaultCases)
.map(defaultCases / os.up / os.RelPath(_)),
runnersAmount
),
))
def generateCiMatrix(defaultCases: String = "default.json", runnersAmount: Int) = {
println(
toMatrixJson(
scheduleTasks(
os.walk(os.pwd/".github"/"cases").filter(_.last == defaultCases),
runnersAmount
),
)
)
}

// Resolve all the executable test and filter out unpassed tests, appending perf testcases
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/subsystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
build-emulators:
name: "Build Emulators"
runs-on: [self-hosted, linux, nixos]
runs-on: [self-hosted, linux, nixos, AMD Ryzen 9 7940HS w/ Radeon 780M Graphics]
strategy:
matrix:
config:
Expand Down Expand Up @@ -52,11 +52,12 @@ jobs:
name: "Generate test matrix"
run: |
echo -n matrix= >> "$GITHUB_OUTPUT"
nix shell ".#ammonite" -c .github/scripts/ci.sc generateCiMatrix --runnersAmount "$RUNNERS" >> "$GITHUB_OUTPUT"
nix shell ".#ammonite" -c .github/scripts/ci.sc generateCiMatrix subsystem.json "$RUNNERS" >> "$GITHUB_OUTPUT"
build-trace-emulators:
name: "Build trace emulator"
runs-on: [self-hosted, linux, nixos]
needs: [gen-matrix]
runs-on: [self-hosted, linux, nixos, AMD Ryzen 9 7940HS w/ Radeon 780M Graphics]
strategy:
fail-fast: false
matrix:
Expand Down

0 comments on commit 7faef50

Please sign in to comment.