From 7faef504be12c32dc8663b7ced72d9c1195fb6ad Mon Sep 17 00:00:00 2001 From: Avimitin Date: Sun, 4 Feb 2024 02:31:32 +0800 Subject: [PATCH] [ci] fix subsystem run in ci - specify test lists for subsystem in individual file - move subsystem build to better machine Signed-off-by: Avimitin --- .github/cases/v1024-l8-b2-fp/subsystem.json | 17 +++++++++++++++++ .github/cases/v1024-l8-b2/subsystem.json | 17 +++++++++++++++++ .github/cases/v4096-l8-b4-fp/subsystem.json | 17 +++++++++++++++++ .github/cases/v4096-l8-b4/subsystem.json | 17 +++++++++++++++++ .github/scripts/ci.sc | 21 +++++++++------------ .github/workflows/subsystem.yml | 7 ++++--- 6 files changed, 81 insertions(+), 15 deletions(-) create mode 100644 .github/cases/v1024-l8-b2-fp/subsystem.json create mode 100644 .github/cases/v1024-l8-b2/subsystem.json create mode 100644 .github/cases/v4096-l8-b4-fp/subsystem.json create mode 100644 .github/cases/v4096-l8-b4/subsystem.json diff --git a/.github/cases/v1024-l8-b2-fp/subsystem.json b/.github/cases/v1024-l8-b2-fp/subsystem.json new file mode 100644 index 0000000000..bd01b1b279 --- /dev/null +++ b/.github/cases/v1024-l8-b2-fp/subsystem.json @@ -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 +} diff --git a/.github/cases/v1024-l8-b2/subsystem.json b/.github/cases/v1024-l8-b2/subsystem.json new file mode 100644 index 0000000000..bd01b1b279 --- /dev/null +++ b/.github/cases/v1024-l8-b2/subsystem.json @@ -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 +} diff --git a/.github/cases/v4096-l8-b4-fp/subsystem.json b/.github/cases/v4096-l8-b4-fp/subsystem.json new file mode 100644 index 0000000000..bd01b1b279 --- /dev/null +++ b/.github/cases/v4096-l8-b4-fp/subsystem.json @@ -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 +} diff --git a/.github/cases/v4096-l8-b4/subsystem.json b/.github/cases/v4096-l8-b4/subsystem.json new file mode 100644 index 0000000000..bd01b1b279 --- /dev/null +++ b/.github/cases/v4096-l8-b4/subsystem.json @@ -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 +} diff --git a/.github/scripts/ci.sc b/.github/scripts/ci.sc index 09186e024c..59fa99c164 100755 --- a/.github/scripts/ci.sc +++ b/.github/scripts/ci.sc @@ -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 diff --git a/.github/workflows/subsystem.yml b/.github/workflows/subsystem.yml index f30401adb9..ef4b1459af 100644 --- a/.github/workflows/subsystem.yml +++ b/.github/workflows/subsystem.yml @@ -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: @@ -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: