From 3efeba3b4e7644882797427ef81df445fe758593 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Mon, 16 Oct 2023 15:26:34 -0700 Subject: [PATCH 01/24] Fix missing parameters for WithRadianceCores --- generators/chipyard/src/main/scala/config/RocketConfigs.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/chipyard/src/main/scala/config/RocketConfigs.scala b/generators/chipyard/src/main/scala/config/RocketConfigs.scala index 0ead0a9f..1947c2be 100644 --- a/generators/chipyard/src/main/scala/config/RocketConfigs.scala +++ b/generators/chipyard/src/main/scala/config/RocketConfigs.scala @@ -36,7 +36,7 @@ class WithRadBootROM(address: BigInt = 0x10000, size: Int = 0x10000, hang: BigIn }) class RadianceROMConfig extends Config( - new freechips.rocketchip.subsystem.WithRadianceCores() ++ + new freechips.rocketchip.subsystem.WithRadianceCores(1, useVxCache = false) ++ new freechips.rocketchip.subsystem.WithCoherentBusTopology ++ new WithExtMemSize(BigInt("80000000", 16)) ++ new WithRadBootROM() ++ From e4c5aa5a0a9d573384f97e5d3d84b5afe7fe3aa4 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Mon, 16 Oct 2023 15:26:57 -0700 Subject: [PATCH 02/24] Bump rocket-chip --- generators/rocket-chip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/rocket-chip b/generators/rocket-chip index fc7c2d05..589fe4bd 160000 --- a/generators/rocket-chip +++ b/generators/rocket-chip @@ -1 +1 @@ -Subproject commit fc7c2d05cad00374a58b08dbc996ee6f54c3fea7 +Subproject commit 589fe4bd35800a064b4a70736b0e731bc037aea4 From ed35277e127af767bccf500a725675f60bed32ba Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:04:53 -0700 Subject: [PATCH 03/24] [ci] Change sim dir to vcs --- .github/actions/prepare-rtl/action.yml | 1 + .github/scripts/defaults.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 74a04037..b4abde09 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -26,6 +26,7 @@ runs: with: path: | sims/verilator + sims/vcs sims/firesim/sim generators/gemmini/software/gemmini-rocc-tests key: ${{ inputs.group-key }}-${{ github.sha }} diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 1028960e..4f4fbaad 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -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 From 7870af3b8e555fd7a1767f7bd85c14f7e4e3def3 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:07:59 -0700 Subject: [PATCH 04/24] [ci] Add group/key/tests for vortex and coalescer; slim down gpu ci --- .github/scripts/defaults.sh | 4 + .github/scripts/run-tests.sh | 10 + .github/workflows/chipyard-run-tests-gpu.yml | 307 ++----------------- 3 files changed, 47 insertions(+), 274 deletions(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 4f4fbaad..88dca6c1 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -32,6 +32,7 @@ grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-he grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboom chipyard-spiflashwrite chipyard-mmios chipyard-nocores chipyard-manyperipherals chipyard-chiplike chipyard-tethered" grouping["group-accels"]="chipyard-mempress chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla" grouping["group-constellation"]="chipyard-constellation" +grouping["group-gpu"]="chipyard-vortex chipyard-coalescer coalescer" grouping["group-tracegen"]="tracegen tracegen-boom" grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar" grouping["group-fpga"]="arty vcu118 vc707 arty100t" @@ -67,8 +68,11 @@ mapping["chipyard-shuttle"]=" CONFIG=ShuttleConfig" mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" mapping["chipyard-nomem-scratchpad"]=" CONFIG=MMIOScratchpadOnlyRocketConfig" mapping["chipyard-constellation"]=" CONFIG=SharedNoCConfig" +mapping["chipyard-vortex"]=" CONFIG=RadianceROMConfig" +mapping["chipyard-coalescer"]=" CONFIG=MemtraceCoreConfig" mapping["constellation"]=" SUB_PROJECT=constellation" +mapping["coalescer"]=" SUB_PROJECT=coalescer" mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests" mapping["icenet"]="SUB_PROJECT=icenet" diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ce272737..582b5535 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -137,6 +137,13 @@ case $1 in chipyard-constellation) run_binary LOADMEM=1 BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv ;; + chipyard-vortex) + # FIXME fix args.bin + run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.elf + ;; + chipyard-coalescer) + run_binary BINARY=none + ;; icenet) run_binary BINARY=none ;; @@ -146,6 +153,9 @@ case $1 in constellation) run_binary BINARY=none ;; + coalescer) + run_binary BINARY=none + ;; rocketchip-amba) run_binary BINARY=none ;; diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index d0983855..2555b0fd 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -236,52 +236,6 @@ jobs: group-key: "group-cores" project-key: "chipyard-rocket" - chipyard-prefetchers-run-tests: - name: chipyard-prefetchers-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-prefetchers" - - chipyard-hetero-run-tests: - name: chipyard-hetero-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-hetero" - chipyard-boom-run-tests: name: chipyard-boom-run-tests needs: prepare-chipyard-cores @@ -305,8 +259,8 @@ jobs: group-key: "group-cores" project-key: "chipyard-boom" - chipyard-shuttle-run-tests: - name: chipyard-shuttle-run-tests + chipyard-vortex-run-tests: + name: chipyard-rocket-run-tests needs: prepare-chipyard-cores runs-on: self-hosted steps: @@ -325,11 +279,11 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" - project-key: "chipyard-shuttle" + group-key: "group-gpu" + project-key: "chipyard-vortex" - chipyard-cva6-run-tests: - name: chipyard-cva6-run-tests + coalescer-run-tests: + name: coalescer-run-tests needs: prepare-chipyard-cores runs-on: self-hosted steps: @@ -348,54 +302,8 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" - project-key: "chipyard-cva6" - - chipyard-ibex-run-tests: - name: chipyard-ibex-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-ibex" - - chipyard-sodor-run-tests: - name: chipyard-sodor-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-sodor" + group-key: "group-gpu" + project-key: "coalescer" chipyard-spike-run-tests: name: chipyard-spike-run-tests @@ -420,74 +328,28 @@ jobs: group-key: "group-cores" project-key: "chipyard-spike" - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: prepare-chipyard-accels - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-sha3" - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-gemmini" - - chipyard-manymmioaccels-run-tests: - name: chipyard-manymmioaccels-run-tests - needs: prepare-chipyard-accels - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-manymmioaccels" + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-accels" + # project-key: "chipyard-gemmini" # chipyard-nvdla-run-tests: # name: chipyard-nvdla-run-tests @@ -512,99 +374,6 @@ jobs: # group-key: "group-accels" # project-key: "chipyard-nvdla" - chipyard-mempress-run-tests: - name: chipyard-mempress-run-tests - needs: prepare-chipyard-accels - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-mempress" - - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: prepare-chipyard-tracegen - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen-boom" - - tracegen-run-tests: - name: tracegen-run-tests - needs: prepare-chipyard-tracegen - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen" - - icenet-run-tests: - name: icenet-run-tests - needs: prepare-chipyard-other - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "icenet" - testchipip-run-tests: name: testchipip-run-tests needs: prepare-chipyard-other @@ -674,20 +443,10 @@ jobs: all_tests_passed: name: "all tests passed" needs: [chipyard-rocket-run-tests, - chipyard-hetero-run-tests, chipyard-boom-run-tests, - chipyard-shuttle-run-tests, - chipyard-cva6-run-tests, - chipyard-ibex-run-tests, - chipyard-sodor-run-tests, - chipyard-sha3-run-tests, - chipyard-gemmini-run-tests, - chipyard-manymmioaccels-run-tests, # chipyard-nvdla-run-tests, - chipyard-prefetchers-run-tests, - chipyard-mempress-run-tests, - tracegen-boom-run-tests, - tracegen-run-tests, - icenet-run-tests, + chipyard-vortex-run-tests, + coalescer-run-tests, + # chipyard-gemmini-run-tests, testchipip-run-tests, rocketchip-run-tests, ] From 57273cc64aab76a2a7a4eead8ebaa30106a6123b Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:12:47 -0700 Subject: [PATCH 05/24] Revert "switch to special fesvr" to fix ci --- toolchains/riscv-tools/riscv-isa-sim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolchains/riscv-tools/riscv-isa-sim b/toolchains/riscv-tools/riscv-isa-sim index 3e87fa0d..5a499ef7 160000 --- a/toolchains/riscv-tools/riscv-isa-sim +++ b/toolchains/riscv-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit 3e87fa0d0a3cd11d435d770d6028989df60f6c27 +Subproject commit 5a499ef718bba2fc323e9771ebd7545c66825ff6 From c5a3e6472bac36b53cfc1971eec91154ecc153cb Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:18:38 -0700 Subject: [PATCH 06/24] [ci] Add missing prepare step for gpu; trim other prepares --- .github/workflows/chipyard-run-tests-gpu.yml | 72 +++++++------------- 1 file changed, 25 insertions(+), 47 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 2555b0fd..7e63065a 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -116,8 +116,8 @@ jobs: with: group-key: "group-cores" - prepare-chipyard-accels: - name: prepare-chipyard-accels + prepare-chipyard-gpu: + name: prepare-chipyard-gpu needs: setup-complete runs-on: self-hosted steps: @@ -136,51 +136,29 @@ jobs: - name: Build RTL on self-hosted uses: ./.github/actions/prepare-rtl with: - group-key: "group-accels" + group-key: "group-gpu" - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Build RTL on self-hosted - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Build RTL on self-hosted - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" + # prepare-chipyard-accels: + # name: prepare-chipyard-accels + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Build RTL on self-hosted + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-accels" ########################################################################## @@ -260,7 +238,7 @@ jobs: project-key: "chipyard-boom" chipyard-vortex-run-tests: - name: chipyard-rocket-run-tests + name: chipyard-vortex-run-tests needs: prepare-chipyard-cores runs-on: self-hosted steps: From 7cdf7ba4fccacc30252adbfde229201d86c79d52 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:19:47 -0700 Subject: [PATCH 07/24] [ci] Comment out chipyard-spike-gemmini-run-tests --- .github/workflows/chipyard-run-tests-gpu.yml | 56 ++++++++++---------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 7e63065a..28eb4840 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -162,34 +162,34 @@ jobs: ########################################################################## - chipyard-spike-gemmini-run-tests: - name: chipyard-spike-gemmini-run-tests - needs: prepare-chipyard-accels # technically doesn't depend on RTL but should be after the build.sh for Gemmini - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Build Gemmini FireMarshal - run: | - conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools - cd ${{ github.workspace }} && ./scripts/init-submodules-no-riscv-tools.sh --force - cd ${{ github.workspace }} && source ./scripts/fix-open-files.sh - git submodule update --init software/firemarshal && cd software/firemarshal && ./init-submodules.sh - cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d build gemmini-smoke.json - - name: Running Gemmini FireMarshal smoke test - run: | - conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools - cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d launch -s gemmini-smoke.json + # chipyard-spike-gemmini-run-tests: + # name: chipyard-spike-gemmini-run-tests + # needs: prepare-chipyard-accels # technically doesn't depend on RTL but should be after the build.sh for Gemmini + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Build Gemmini FireMarshal + # run: | + # conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools + # cd ${{ github.workspace }} && ./scripts/init-submodules-no-riscv-tools.sh --force + # cd ${{ github.workspace }} && source ./scripts/fix-open-files.sh + # git submodule update --init software/firemarshal && cd software/firemarshal && ./init-submodules.sh + # cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d build gemmini-smoke.json + # - name: Running Gemmini FireMarshal smoke test + # run: | + # conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools + # cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d launch -s gemmini-smoke.json chipyard-rocket-run-tests: name: chipyard-rocket-run-tests From 0860400b630da1b2a81c2b967cc031cdce6239fc Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 00:21:46 -0700 Subject: [PATCH 08/24] [ci] Add back prepare-chipyard-other --- .github/workflows/chipyard-run-tests-gpu.yml | 22 ++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 28eb4840..20904206 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -160,6 +160,28 @@ jobs: # with: # group-key: "group-accels" + prepare-chipyard-other: + name: prepare-chipyard-other + needs: setup-complete + runs-on: self-hosted + steps: + - name: Delete old checkout + run: | + ls -alh . + rm -rf ${{ github.workspace }}/* || true + rm -rf ${{ github.workspace }}/.* || true + ls -alh . + - name: Checkout + uses: actions/checkout@v3 + - name: Git workaround + uses: ./.github/actions/git-workaround + - name: Create conda env + uses: ./.github/actions/create-conda-env + - name: Build RTL on self-hosted + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + ########################################################################## # chipyard-spike-gemmini-run-tests: From 201627fc10f55acc771dc354974a23648764ab37 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 01:10:50 -0700 Subject: [PATCH 09/24] [ci] Switch back to verilator vcs has glibc version issues on illixr. --- .github/scripts/defaults.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 88dca6c1..a5f7f62e 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -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/vcs +REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator 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/vcs +LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim # CI uses temp directories with very long names From fd14987ccd2cfe9a20bec93b3ea641e015aece9c Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 01:13:48 -0700 Subject: [PATCH 10/24] [ci] Add chipyard-coalescer-run-tests; fix needs field --- .github/workflows/chipyard-run-tests-gpu.yml | 27 ++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 20904206..6d8c16c3 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -261,7 +261,7 @@ jobs: chipyard-vortex-run-tests: name: chipyard-vortex-run-tests - needs: prepare-chipyard-cores + needs: prepare-chipyard-gpu runs-on: self-hosted steps: - name: Delete old checkout @@ -282,9 +282,32 @@ jobs: group-key: "group-gpu" project-key: "chipyard-vortex" + chipyard-coalescer-run-tests: + name: chipyard-coalescer-run-tests + needs: prepare-chipyard-gpu + runs-on: self-hosted + steps: + - name: Delete old checkout + run: | + ls -alh . + rm -rf ${{ github.workspace }}/* || true + rm -rf ${{ github.workspace }}/.* || true + ls -alh . + - name: Checkout + uses: actions/checkout@v3 + - name: Git workaround + uses: ./.github/actions/git-workaround + - name: Create conda env + uses: ./.github/actions/create-conda-env + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-gpu" + project-key: "chipyard-coalescer" + coalescer-run-tests: name: coalescer-run-tests - needs: prepare-chipyard-cores + needs: prepare-chipyard-gpu runs-on: self-hosted steps: - name: Delete old checkout From 27aad2b5ad39327bc2d7a596cb25046bf6e74276 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 10:50:03 -0700 Subject: [PATCH 11/24] Add generators/rocket-gpu submodule --- .gitmodules | 3 +++ generators/rocket-gpu | 1 + 2 files changed, 4 insertions(+) create mode 160000 generators/rocket-gpu diff --git a/.gitmodules b/.gitmodules index 962735df..9be7aba6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -133,3 +133,6 @@ [submodule "generators/hardfloat"] path = generators/hardfloat url = https://github.com/ucb-bar/berkeley-hardfloat.git +[submodule "generators/rocket-gpu"] + path = generators/rocket-gpu + url = https://github.com/hansungk/rocket-gpu.git diff --git a/generators/rocket-gpu b/generators/rocket-gpu new file mode 160000 index 00000000..d7906ee9 --- /dev/null +++ b/generators/rocket-gpu @@ -0,0 +1 @@ +Subproject commit d7906ee93efd3936dfec7b7f27339bb15977acce From 847b753358adc33dc19e96687f7733e00bb5aa62 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 11:01:29 -0700 Subject: [PATCH 12/24] [ci] Add action to copy gpu args/op binaries --- .github/actions/prepare-gpu/action.yml | 29 ++++++++++++++++++++ .github/scripts/copy-gpu-binaries.sh | 23 ++++++++++++++++ .github/workflows/chipyard-run-tests-gpu.yml | 2 ++ 3 files changed, 54 insertions(+) create mode 100644 .github/actions/prepare-gpu/action.yml create mode 100755 .github/scripts/copy-gpu-binaries.sh diff --git a/.github/actions/prepare-gpu/action.yml b/.github/actions/prepare-gpu/action.yml new file mode 100644 index 00000000..050e4657 --- /dev/null +++ b/.github/actions/prepare-gpu/action.yml @@ -0,0 +1,29 @@ +name: prepare-gpu +description: 'Copy over GPU binaries to be used in simulation time to sims directory' + +inputs: + group-key: + description: group key + required: true + prepare-script: + description: prepare script to use + required: false + default: "copy-gpu-binaries.sh" + toolchain: + description: toolchain to use + required: false + default: "riscv-tools" + +runs: + using: "composite" + steps: + - 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 }} + ./scripts/init-submodules-no-riscv-tools.sh --force + shell: bash -leo pipefail {0} + + - name: Copy binaries from rocket-gpu + run: | + ./.github/scripts/${{ inputs.prepare-script }} + shell: bash -leo pipefail {0} diff --git a/.github/scripts/copy-gpu-binaries.sh b/.github/scripts/copy-gpu-binaries.sh new file mode 100755 index 00000000..23ea1366 --- /dev/null +++ b/.github/scripts/copy-gpu-binaries.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# copy gpu binaries from stimuli folder +# usage: +# copy-gpu-binaries.sh + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +cd $REMOTE_CHIPYARD_DIR + +cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.bin.elf \ + $REMOTE_SIM_DIR/ +cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.args.size64.romAddr.bin \ + $REMOTE_SIM_DIR/args.bin +cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.a.size64.bin \ + $REMOTE_SIM_DIR/op_a.bin +cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.b.size64.bin \ + $REMOTE_SIM_DIR/op_b.bin diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 6d8c16c3..4a5516ca 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -133,6 +133,8 @@ jobs: uses: ./.github/actions/git-workaround - name: Create conda env uses: ./.github/actions/create-conda-env + - name: Prepare GPU binaries + uses: ./.github/actions/prepare-gpu - name: Build RTL on self-hosted uses: ./.github/actions/prepare-rtl with: From 3bd68911c346b153a53397790bdace1b019aa64d Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 11:03:36 -0700 Subject: [PATCH 13/24] [ci] Trim down gpu ci to the minimum --- .github/workflows/chipyard-run-tests-gpu.yml | 346 ++++++++++--------- 1 file changed, 174 insertions(+), 172 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 4a5516ca..0d217716 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -94,27 +94,27 @@ jobs: ########################################################################## - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Build RTL on self-hosted - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" + # prepare-chipyard-cores: + # name: prepare-chipyard-cores + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Build RTL on self-hosted + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-cores" prepare-chipyard-gpu: name: prepare-chipyard-gpu @@ -162,27 +162,27 @@ jobs: # with: # group-key: "group-accels" - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Build RTL on self-hosted - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" + # prepare-chipyard-other: + # name: prepare-chipyard-other + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Build RTL on self-hosted + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-other" ########################################################################## @@ -215,51 +215,51 @@ jobs: # conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools # cd ${{ github.workspace }}/generators/gemmini/software && ${{ github.workspace }}/software/firemarshal/marshal -v -d launch -s gemmini-smoke.json - chipyard-rocket-run-tests: - name: chipyard-rocket-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-rocket" + # chipyard-rocket-run-tests: + # name: chipyard-rocket-run-tests + # needs: prepare-chipyard-cores + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-rocket" - chipyard-boom-run-tests: - name: chipyard-boom-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-boom" + # chipyard-boom-run-tests: + # name: chipyard-boom-run-tests + # needs: prepare-chipyard-cores + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-boom" chipyard-vortex-run-tests: name: chipyard-vortex-run-tests @@ -330,28 +330,28 @@ jobs: group-key: "group-gpu" project-key: "coalescer" - chipyard-spike-run-tests: - name: chipyard-spike-run-tests - needs: prepare-chipyard-cores - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-spike" + # chipyard-spike-run-tests: + # name: chipyard-spike-run-tests + # needs: prepare-chipyard-cores + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-cores" + # project-key: "chipyard-spike" # chipyard-gemmini-run-tests: # name: chipyard-gemmini-run-tests @@ -399,67 +399,67 @@ jobs: # group-key: "group-accels" # project-key: "chipyard-nvdla" - testchipip-run-tests: - name: testchipip-run-tests - needs: prepare-chipyard-other - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "testchipip" + # testchipip-run-tests: + # name: testchipip-run-tests + # needs: prepare-chipyard-other + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "testchipip" - rocketchip-run-tests: - name: rocketchip-run-tests - needs: prepare-chipyard-other - runs-on: self-hosted - steps: - - name: Delete old checkout - run: | - ls -alh . - rm -rf ${{ github.workspace }}/* || true - rm -rf ${{ github.workspace }}/.* || true - ls -alh . - - name: Checkout - uses: actions/checkout@v3 - - name: Git workaround - uses: ./.github/actions/git-workaround - - name: Create conda env - uses: ./.github/actions/create-conda-env - - name: Run amba tests - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "rocketchip-amba" - # Below tests segfault with verilator, work fine in VCS - # - name: Run tlsimple tests - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "rocketchip-tlsimple" - # - name: Run tlwidth tests - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "rocketchip-tlwidth" - # - name: Run tlxbar tests - # uses: ./.github/actions/run-tests - # with: - # group-key: "group-other" - # project-key: "rocketchip-tlxbar" + # rocketchip-run-tests: + # name: rocketchip-run-tests + # needs: prepare-chipyard-other + # runs-on: self-hosted + # steps: + # - name: Delete old checkout + # run: | + # ls -alh . + # rm -rf ${{ github.workspace }}/* || true + # rm -rf ${{ github.workspace }}/.* || true + # ls -alh . + # - name: Checkout + # uses: actions/checkout@v3 + # - name: Git workaround + # uses: ./.github/actions/git-workaround + # - name: Create conda env + # uses: ./.github/actions/create-conda-env + # - name: Run amba tests + # uses: ./.github/actions/run-tests + # with: + # group-key: "group-other" + # project-key: "rocketchip-amba" + # # Below tests segfault with verilator, work fine in VCS + # # - name: Run tlsimple tests + # # uses: ./.github/actions/run-tests + # # with: + # # group-key: "group-other" + # # project-key: "rocketchip-tlsimple" + # # - name: Run tlwidth tests + # # uses: ./.github/actions/run-tests + # # with: + # # group-key: "group-other" + # # project-key: "rocketchip-tlwidth" + # # - name: Run tlxbar tests + # # uses: ./.github/actions/run-tests + # # with: + # # group-key: "group-other" + # # project-key: "rocketchip-tlxbar" # Sentinel job to simplify how we specify which checks need to pass in branch # protection and in Mergify @@ -467,13 +467,15 @@ jobs: # When adding new top level jobs, please add them to `needs` below all_tests_passed: name: "all tests passed" - needs: [chipyard-rocket-run-tests, - chipyard-boom-run-tests, + needs: [ + # chipyard-rocket-run-tests, + # chipyard-boom-run-tests, chipyard-vortex-run-tests, + chipyard-coalescer-run-tests, coalescer-run-tests, # chipyard-gemmini-run-tests, - testchipip-run-tests, - rocketchip-run-tests, + # testchipip-run-tests, + # rocketchip-run-tests, ] runs-on: self-hosted steps: From e966b91cbe6cc4fb0a763d473a1c101642074ba6 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 11:41:04 -0700 Subject: [PATCH 14/24] [ci] Add SSH key before init-submodules for access to rocket-gpu Need to do the same for every init-submodule script run --- .github/actions/prepare-gpu/action.yml | 2 ++ .github/scripts/run-tests.sh | 2 +- .gitmodules | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/prepare-gpu/action.yml b/.github/actions/prepare-gpu/action.yml index 050e4657..e0527808 100644 --- a/.github/actions/prepare-gpu/action.yml +++ b/.github/actions/prepare-gpu/action.yml @@ -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 }} + eval `ssh-agent -s` + ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' ./scripts/init-submodules-no-riscv-tools.sh --force shell: bash -leo pipefail {0} diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 582b5535..d04b07fc 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -139,7 +139,7 @@ case $1 in ;; chipyard-vortex) # FIXME fix args.bin - run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.elf + run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.bin.elf ;; chipyard-coalescer) run_binary BINARY=none diff --git a/.gitmodules b/.gitmodules index 9be7aba6..3d7620c8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -135,4 +135,4 @@ url = https://github.com/ucb-bar/berkeley-hardfloat.git [submodule "generators/rocket-gpu"] path = generators/rocket-gpu - url = https://github.com/hansungk/rocket-gpu.git + url = git@github.com:hansungk/rocket-gpu.git From 2a1433d321c1fe8574a6b2c1f32c4782d68cc9f6 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 12:00:39 -0700 Subject: [PATCH 15/24] [ci] Attempt to fix secrets variable error --- .github/actions/prepare-gpu/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/prepare-gpu/action.yml b/.github/actions/prepare-gpu/action.yml index e0527808..20a6e4df 100644 --- a/.github/actions/prepare-gpu/action.yml +++ b/.github/actions/prepare-gpu/action.yml @@ -21,7 +21,7 @@ runs: run: | conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-${{ inputs.toolchain }} eval `ssh-agent -s` - ssh-add - <<< '${{ secrets.PRIVATE_SSH_KEY }}' + ssh-add - <<< ${{ secrets.PRIVATE_SSH_KEY }} ./scripts/init-submodules-no-riscv-tools.sh --force shell: bash -leo pipefail {0} From 9d0d3d665e4bc05f80bfa8df17b3f2a47458ce73 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 12:12:53 -0700 Subject: [PATCH 16/24] [ci] Use webfactory/ssh-agent --- .github/actions/prepare-gpu/action.yml | 2 -- .github/workflows/chipyard-run-tests-gpu.yml | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/prepare-gpu/action.yml b/.github/actions/prepare-gpu/action.yml index 20a6e4df..050e4657 100644 --- a/.github/actions/prepare-gpu/action.yml +++ b/.github/actions/prepare-gpu/action.yml @@ -20,8 +20,6 @@ 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 }} - eval `ssh-agent -s` - ssh-add - <<< ${{ secrets.PRIVATE_SSH_KEY }} ./scripts/init-submodules-no-riscv-tools.sh --force shell: bash -leo pipefail {0} diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 0d217716..856d7d18 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -121,6 +121,9 @@ jobs: needs: setup-complete runs-on: self-hosted steps: + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Delete old checkout run: | ls -alh . From f71b0144ecb5fdb33272b5c482a5599fd476ff87 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 12:33:37 -0700 Subject: [PATCH 17/24] Move args/op bin directory to sims/ This is to help ci find the binaries correctly for both vcs and verilator. --- .github/scripts/copy-gpu-binaries.sh | 16 ++++++++-------- .github/workflows/chipyard-run-tests-gpu.yml | 1 + .../src/main/scala/config/RocketConfigs.scala | 12 ++++++------ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/scripts/copy-gpu-binaries.sh b/.github/scripts/copy-gpu-binaries.sh index 23ea1366..a2932bd1 100755 --- a/.github/scripts/copy-gpu-binaries.sh +++ b/.github/scripts/copy-gpu-binaries.sh @@ -13,11 +13,11 @@ source $SCRIPT_DIR/defaults.sh cd $REMOTE_CHIPYARD_DIR -cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.bin.elf \ - $REMOTE_SIM_DIR/ -cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.args.size64.romAddr.bin \ - $REMOTE_SIM_DIR/args.bin -cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.a.size64.bin \ - $REMOTE_SIM_DIR/op_a.bin -cp -a $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.b.size64.bin \ - $REMOTE_SIM_DIR/op_b.bin +cp -av $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.bin.elf \ + $REMOTE_CHIPYARD_DIR/sims/ +cp -av $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.args.size64.romAddr.bin \ + $REMOTE_CHIPYARD_DIR/sims/args.bin +cp -av $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.a.size64.bin \ + $REMOTE_CHIPYARD_DIR/sims/op_a.bin +cp -av $REMOTE_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.input.b.size64.bin \ + $REMOTE_CHIPYARD_DIR/sims/op_b.bin diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 856d7d18..34710598 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -121,6 +121,7 @@ jobs: needs: setup-complete runs-on: self-hosted steps: + # see https://gist.github.com/pataruco/91b6cda6b02b61b3bcd2bbbfaa963fd9 - uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} diff --git a/generators/chipyard/src/main/scala/config/RocketConfigs.scala b/generators/chipyard/src/main/scala/config/RocketConfigs.scala index 1947c2be..58672483 100644 --- a/generators/chipyard/src/main/scala/config/RocketConfigs.scala +++ b/generators/chipyard/src/main/scala/config/RocketConfigs.scala @@ -40,9 +40,9 @@ class RadianceROMConfig extends Config( new freechips.rocketchip.subsystem.WithCoherentBusTopology ++ new WithExtMemSize(BigInt("80000000", 16)) ++ new WithRadBootROM() ++ - new WithRadROMs(0x7FFF0000L, 0x10000, "sims/vcs/args.bin") ++ - new WithRadROMs(0x20000L, 0x8000, "sims/vcs/op_a.bin") ++ - new WithRadROMs(0x28000L, 0x8000, "sims/vcs/op_b.bin") ++ + new WithRadROMs(0x7FFF0000L, 0x10000, "sims/args.bin") ++ + new WithRadROMs(0x20000L, 0x8000, "sims/op_a.bin") ++ + new WithRadROMs(0x28000L, 0x8000, "sims/op_b.bin") ++ new AbstractConfig) class RadianceConfig extends Config( @@ -61,9 +61,9 @@ class RadianceConfigVortexCache extends Config( // new testchipip.WithMbusScratchpad(banks=2) ++ new WithExtMemSize(BigInt("80000000", 16)) ++ new WithRadBootROM() ++ - new WithRadROMs(0x7FFF0000L, 0x10000, "sims/vcs/args.bin") ++ - new WithRadROMs(0x20000L, 0x8000, "sims/vcs/op_a.bin") ++ - new WithRadROMs(0x28000L, 0x8000, "sims/vcs/op_b.bin") ++ + new WithRadROMs(0x7FFF0000L, 0x10000, "sims/args.bin") ++ + new WithRadROMs(0x20000L, 0x8000, "sims/op_a.bin") ++ + new WithRadROMs(0x28000L, 0x8000, "sims/op_b.bin") ++ new AbstractConfig ) From 306fdd971c36c3de9bc5255a664eb01aead06fab Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 13:16:16 -0700 Subject: [PATCH 18/24] [ci] Use ssh-agent for all tests --- .github/workflows/chipyard-run-tests-gpu.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 34710598..84586592 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -270,6 +270,9 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Delete old checkout run: | ls -alh . @@ -293,6 +296,9 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Delete old checkout run: | ls -alh . @@ -316,6 +322,9 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: + - uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Delete old checkout run: | ls -alh . From d66e903d97bee7699f0061b0f2a2b31dd7aba3c3 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 14:19:31 -0700 Subject: [PATCH 19/24] [ci] Run ssh-agent manually --- .github/workflows/chipyard-run-tests-gpu.yml | 40 ++++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 84586592..266c0def 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -122,9 +122,13 @@ jobs: runs-on: self-hosted steps: # see https://gist.github.com/pataruco/91b6cda6b02b61b3bcd2bbbfaa963fd9 - - uses: webfactory/ssh-agent@v0.8.0 - with: - ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + # - uses: webfactory/ssh-agent@v0.8.0 + # with: + # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + - name: Run ssh-agent + run: | + eval `ssh-agent -s` + echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -270,9 +274,13 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - - uses: webfactory/ssh-agent@v0.8.0 - with: - ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + # - uses: webfactory/ssh-agent@v0.8.0 + # with: + # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + - name: Run ssh-agent + run: | + eval `ssh-agent -s` + echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -296,9 +304,13 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - - uses: webfactory/ssh-agent@v0.8.0 - with: - ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + # - uses: webfactory/ssh-agent@v0.8.0 + # with: + # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + - name: Run ssh-agent + run: | + eval `ssh-agent -s` + echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -322,9 +334,13 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - - uses: webfactory/ssh-agent@v0.8.0 - with: - ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + # - uses: webfactory/ssh-agent@v0.8.0 + # with: + # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} + - name: Run ssh-agent + run: | + eval `ssh-agent -s` + echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . From 3474060c4530029a489df1f90a620fd682398055 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 14:22:39 -0700 Subject: [PATCH 20/24] [ci] Supply absolute path to memtrace for coalescer --- .github/scripts/run-tests.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index d04b07fc..378dae0c 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -138,11 +138,10 @@ case $1 in run_binary LOADMEM=1 BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv ;; chipyard-vortex) - # FIXME fix args.bin run_binary BINARY=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/stimuli/vecadd.bin.elf ;; chipyard-coalescer) - run_binary BINARY=none + run_binary BINARY=none EXTRA_SIM_FLAGS="+memtracefile=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/tracefiles/vecadd.core1.thread4.trace" ;; icenet) run_binary BINARY=none @@ -154,7 +153,7 @@ case $1 in run_binary BINARY=none ;; coalescer) - run_binary BINARY=none + run_binary BINARY=none EXTRA_SIM_FLAGS="+memtracefile=$LOCAL_CHIPYARD_DIR/generators/rocket-gpu/tracefiles/vecadd.core1.thread4.trace" ;; rocketchip-amba) run_binary BINARY=none From 6864f405344dc639400ef4766ef97fc37b65e944 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 14:41:25 -0700 Subject: [PATCH 21/24] [ci] Set SSH_AUTH_SOCK for ssh-agent --- .github/workflows/chipyard-run-tests-gpu.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 266c0def..8eefcf1c 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -16,6 +16,7 @@ env: conda-env-name-no-time: cy-${{ github.run_id }} workflow-timestamp: ${{ github.event.pull_request.updated_at }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SSH_AUTH_SOCK: /tmp/ssh_agent_github.sock jobs: cancel-prior-workflows: @@ -127,7 +128,7 @@ jobs: # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Run ssh-agent run: | - eval `ssh-agent -s` + eval `ssh-agent -a $SSH_AUTH_SOCK -s` echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | @@ -279,7 +280,7 @@ jobs: # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Run ssh-agent run: | - eval `ssh-agent -s` + eval `ssh-agent -a $SSH_AUTH_SOCK -s` echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | @@ -309,7 +310,7 @@ jobs: # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Run ssh-agent run: | - eval `ssh-agent -s` + eval `ssh-agent -a $SSH_AUTH_SOCK -s` echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | @@ -339,7 +340,7 @@ jobs: # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - name: Run ssh-agent run: | - eval `ssh-agent -s` + eval `ssh-agent -a $SSH_AUTH_SOCK -s` echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | From 34bfdd547ec7bdbb8c923a285b81b65243780a90 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 15:18:33 -0700 Subject: [PATCH 22/24] [ci] Set up ssh-agent only once during create-conda-env --- .github/workflows/chipyard-run-tests-gpu.yml | 35 ++++---------------- 1 file changed, 6 insertions(+), 29 deletions(-) diff --git a/.github/workflows/chipyard-run-tests-gpu.yml b/.github/workflows/chipyard-run-tests-gpu.yml index 8eefcf1c..55970939 100644 --- a/.github/workflows/chipyard-run-tests-gpu.yml +++ b/.github/workflows/chipyard-run-tests-gpu.yml @@ -73,6 +73,12 @@ jobs: 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 - - name: Checkout uses: actions/checkout@v3 - name: Git workaround @@ -122,14 +128,6 @@ jobs: needs: setup-complete runs-on: self-hosted steps: - # see https://gist.github.com/pataruco/91b6cda6b02b61b3bcd2bbbfaa963fd9 - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -275,13 +273,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -305,13 +296,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . @@ -335,13 +319,6 @@ jobs: needs: prepare-chipyard-gpu runs-on: self-hosted steps: - # - uses: webfactory/ssh-agent@v0.8.0 - # with: - # ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY }} - - name: Run ssh-agent - run: | - eval `ssh-agent -a $SSH_AUTH_SOCK -s` - echo "${{ secrets.PRIVATE_SSH_KEY }}" | ssh-add - - name: Delete old checkout run: | ls -alh . From 1f7995c2516dd77ca90e6054e4a3bd63a243e579 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 17 Oct 2023 15:31:05 -0700 Subject: [PATCH 23/24] Bump rocket-gpu --- generators/rocket-gpu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/rocket-gpu b/generators/rocket-gpu index d7906ee9..1b348651 160000 --- a/generators/rocket-gpu +++ b/generators/rocket-gpu @@ -1 +1 @@ -Subproject commit d7906ee93efd3936dfec7b7f27339bb15977acce +Subproject commit 1b3486512523d6030dc7a3ef64bc880c53061876 From bfe7f1b9d76a53d52f31a29a01503749d2121275 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Wed, 18 Oct 2023 20:07:29 -0700 Subject: [PATCH 24/24] Bump rocket-chip --- generators/rocket-chip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/rocket-chip b/generators/rocket-chip index 589fe4bd..e02ba347 160000 --- a/generators/rocket-chip +++ b/generators/rocket-chip @@ -1 +1 @@ -Subproject commit 589fe4bd35800a064b4a70736b0e731bc037aea4 +Subproject commit e02ba3476b230ebb7e8dcb4ff0ce5832ef6a9f39