Bump cyclotron to better-pipelined mxgemms #339
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| pull_request: | |
| defaults: | |
| run: | |
| # for conda | |
| shell: bash -leo pipefail {0} | |
| env: | |
| CHIPYARD_RELPATH: chipyard-work | |
| CHIPYARD_RUN_ROOT: "/scratch/buildbot/radiance-ci-runs/${{ github.run_id }}-${{ github.run_attempt }}" | |
| CHIPYARD_DIR: "/scratch/buildbot/radiance-ci-runs/${{ github.run_id }}-${{ github.run_attempt }}/chipyard" | |
| CHIPYARD_LOG_ROOT: "/scratch/buildbot/radiance-ci-logs" | |
| CHIPYARD_RUN_LOG_DIR: "/scratch/buildbot/radiance-ci-logs/${{ github.run_id }}-${{ github.run_attempt }}" | |
| # flip to force-reset cache | |
| CACHE_NUMBER: 0 | |
| JAVA_HEAP_SIZE: "64G" | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: as4 | |
| env: | |
| # fix broken IPv6 | |
| RUSTUP_USE_CURL: "1" | |
| CURL_IPRESOLVE: "4" | |
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" | |
| CARGO_NET_RETRY: "10" | |
| CARGO_HTTP_TIMEOUT: "60" | |
| steps: | |
| - name: Setup system | |
| run: | | |
| set -x | |
| cat /proc/cpuinfo | tail -n20 | |
| vmstat -SM | |
| df -h | |
| mkdir -p "${CHIPYARD_RUN_LOG_DIR}" | |
| [ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}"/* | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout Chipyard | |
| id: checkout-chipyard | |
| run: | | |
| mkdir -p "${CHIPYARD_RUN_ROOT}" | |
| git clone --depth 1 --branch graphics "https://github.com/ucb-bar/chipyard.git" "${CHIPYARD_DIR}" | |
| cd "${CHIPYARD_DIR}" | |
| CHIPYARD_HASH="$(git rev-parse HEAD)" | |
| echo "CHIPYARD_HASH=${CHIPYARD_HASH}" >> "${GITHUB_ENV}" | |
| echo "chipyard_hash=${CHIPYARD_HASH}" >> "${GITHUB_OUTPUT}" | |
| # for caching | |
| ln -sf "${CHIPYARD_DIR}" "${GITHUB_WORKSPACE}/${CHIPYARD_RELPATH}" | |
| - name: Install conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| auto-activate-base: true | |
| activate-environment: "" | |
| - name: Configure conda env | |
| id: conda-env | |
| run: | | |
| CONDA_BASE="$(conda info --base)" | |
| CONDA_ENV_NAME="chipyard-${CHIPYARD_HASH}" | |
| CONDA_ENV_DIR="${CONDA_BASE}/envs/${CONDA_ENV_NAME}" | |
| echo "CONDA_ENV_NAME=${CONDA_ENV_NAME}" >> "${GITHUB_ENV}" | |
| echo "CONDA_ENV_DIR=${CONDA_ENV_DIR}" >> "${GITHUB_ENV}" | |
| echo "conda_env_name=${CONDA_ENV_NAME}" >> "${GITHUB_OUTPUT}" | |
| echo "conda_env_dir=${CONDA_ENV_DIR}" >> "${GITHUB_OUTPUT}" | |
| - name: Setup rust | |
| run: | | |
| echo "CARGO_HOME=$HOME/.cargo" >> "$GITHUB_ENV" | |
| echo "RUSTUP_HOME=$HOME/.rustup" >> "$GITHUB_ENV" | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| - name: Check rust | |
| run: | | |
| command -v rustc | |
| command -v cargo | |
| rustup --version | |
| rustc --version | |
| cargo --version | |
| - name: Cache conda-env | |
| id: cache-conda-env | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ steps.conda-env.outputs.conda_env_dir }} | |
| key: chipyard-${{ steps.checkout-chipyard.outputs.chipyard_hash }}-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NUMBER }} | |
| - name: Setup Chipyard | |
| run: | | |
| .github/scripts/setup-chipyard.sh "${{ steps.cache-conda-env.outputs.cache-hit }}" | |
| - name: Setup Radiance | |
| # move radiance to under chipyard/generators | |
| run: | | |
| set -eux | |
| rm -rf "${CHIPYARD_DIR}/generators/radiance" | |
| rsync -a --exclude "/${CHIPYARD_RELPATH}/" \ | |
| "${GITHUB_WORKSPACE}/" "${CHIPYARD_DIR}/generators/radiance/" | |
| ls -al "${CHIPYARD_DIR}/generators/radiance" | |
| # warm up cargo as fetching index.crates.io likes to fail intermittently | |
| - name: Cargo fetch | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance/cyclotron" | |
| cargo fetch | |
| - name: Cache Scala build files | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ env.CHIPYARD_RELPATH }}/generators/**/target/** | |
| ${{ env.CHIPYARD_RELPATH }}/.ivy2/cache | |
| ${{ env.CHIPYARD_RELPATH }}/.sbt | |
| ~/.cache/coursier | |
| key: scala-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}-${{ env.CACHE_NUMBER }} | |
| restore-keys: | | |
| scala-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Build Radiance sim binary | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd sims/vcs | |
| make default CONFIG=RadianceTapeoutSimTraceConfig | |
| make default CONFIG=RadianceTapeoutNDAFreeConfig | |
| make default CONFIG=TetheredRadianceTapeoutConfig | |
| make default SUB_PROJECT=muon CONFIG=MuonCoreTestConfig | |
| make default CONFIG=RadianceCyclotronConfig | |
| make default SUB_PROJECT=muon CONFIG=MuonBackendTestConfig | |
| run-unit-tests: | |
| name: Run Unit-tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run ChiselTest unit-tests | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| sbt "project radiance; \ | |
| testOnly radiance.muon.ALUPipeTest; \ | |
| testOnly radiance.muon.FPPipeTest; \ | |
| testOnly radiance.muon.MulDivPipeTest; \ | |
| testOnly radiance.muon.SequencerTest; \ | |
| testOnly radiance.muon.ScoreboardTest" | |
| run-tapeout-binary-tests: | |
| name: Run Tapeout binary tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run binary tests on tapeout config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_binary_tests.py -j "$(nproc)" -c tapeout \ | |
| --timeout 7200 \ | |
| --log-dir "${CHIPYARD_RUN_LOG_DIR}" \ | |
| --elf-dir cyclotron/test/host-launch \ | |
| --json-out "${CHIPYARD_RUN_LOG_DIR}/tapeout/results.json" | |
| - name: Run bindiff tests on tapeout config | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/run_bindiff_tests.py "${CHIPYARD_RUN_LOG_DIR}/tapeout/results.json" | |
| - name: Render binary test report | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/render_binary_test_report.py \ | |
| "${CHIPYARD_RUN_LOG_DIR}/tapeout/results.json" \ | |
| --github-step-summary | |
| run-tethered-binary-tests: | |
| name: Run Tethered binary tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run binary tests on host-launch config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_binary_tests.py -j "$(nproc)" -c tethered \ | |
| --timeout 7200 \ | |
| --log-dir "${CHIPYARD_RUN_LOG_DIR}" \ | |
| --elf-dir cyclotron/test/host-launch \ | |
| --json-out "${CHIPYARD_RUN_LOG_DIR}/hostlaunch/results.json" | |
| - name: Run bindiff tests on host-launch config | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/run_bindiff_tests.py "${CHIPYARD_RUN_LOG_DIR}/hostlaunch/results.json" | |
| - name: Render binary test report | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/render_binary_test_report.py \ | |
| "${CHIPYARD_RUN_LOG_DIR}/hostlaunch/results.json" \ | |
| --github-step-summary | |
| run-soc-binary-tests: | |
| name: Run SoC binary tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run binary tests on SoC config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_binary_tests.py -j "$(nproc)" \ | |
| --timeout 5400 \ | |
| --log-dir "${CHIPYARD_RUN_LOG_DIR}" \ | |
| --elf-dir cyclotron/test/fused \ | |
| --json-out "${CHIPYARD_RUN_LOG_DIR}/soc/results.json" | |
| - name: Run bindiff tests on SoC config | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/run_bindiff_tests.py "${CHIPYARD_RUN_LOG_DIR}/soc/results.json" | |
| - name: Render binary test report | |
| if: always() | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance" | |
| python3 test/render_binary_test_report.py \ | |
| "${CHIPYARD_RUN_LOG_DIR}/soc/results.json" \ | |
| --github-step-summary | |
| # run-core-binary-tests: | |
| # name: Run Core-standalone binary tests | |
| # runs-on: as4 | |
| # needs: build | |
| # continue-on-error: true | |
| # steps: | |
| # - name: Run binary tests on core-as-top config | |
| # # waive non-essential core/cosim tests tapeout | |
| # run: | | |
| # cd "${CHIPYARD_DIR}" | |
| # source env.sh | |
| # source /ecad/tools/vlsi.bashrc | |
| # cd generators/radiance | |
| # python3 test/run_binary_tests.py -j "$(nproc)" -c core \ | |
| # --log-dir "${CHIPYARD_RUN_LOG_DIR}" \ | |
| # --elf-dir cyclotron/test/isa-tests \ | |
| # --json-out "${CHIPYARD_RUN_LOG_DIR}/core/results.json" | |
| # - name: Run bindiff tests on core-as-top config | |
| # if: always() | |
| # run: | | |
| # cd "${CHIPYARD_DIR}/generators/radiance" | |
| # python3 test/run_bindiff_tests.py "${CHIPYARD_RUN_LOG_DIR}/core/results.json" | |
| # - name: Render binary test report | |
| # if: always() | |
| # run: | | |
| # cd "${CHIPYARD_DIR}/generators/radiance" | |
| # python3 test/render_binary_test_report.py \ | |
| # "${CHIPYARD_RUN_LOG_DIR}/core/results.json" \ | |
| # --github-step-summary | |
| # run-cosim-binary-tests: | |
| # name: Run Cyclotron-as-a-Tile Co-sim binary tests | |
| # runs-on: as4 | |
| # needs: build | |
| # continue-on-error: true | |
| # steps: | |
| # - name: Run binary tests on backend co-sim config | |
| # # waive non-essential core/cosim tests tapeout | |
| # run: | | |
| # cd "${CHIPYARD_DIR}" | |
| # source env.sh | |
| # source /ecad/tools/vlsi.bashrc | |
| # cd generators/radiance | |
| # python3 test/run_binary_tests.py -j "$(nproc)" -c cosim \ | |
| # --log-dir "${CHIPYARD_RUN_LOG_DIR}" \ | |
| # --elf-dir cyclotron/test/fused \ | |
| # --json-out "${CHIPYARD_RUN_LOG_DIR}/cosim/results.json" | |
| # - name: Run bindiff tests on backend co-sim config | |
| # if: always() | |
| # run: | | |
| # cd "${CHIPYARD_DIR}/generators/radiance" | |
| # python3 test/run_bindiff_tests.py "${CHIPYARD_RUN_LOG_DIR}/cosim/results.json" | |
| # - name: Render binary test report | |
| # if: always() | |
| # run: | | |
| # cd "${CHIPYARD_DIR}/generators/radiance" | |
| # python3 test/render_binary_test_report.py \ | |
| # "${CHIPYARD_RUN_LOG_DIR}/cosim/results.json" \ | |
| # --github-step-summary | |
| # run-backend-cosim-binary-tests: | |
| # name: Run Backend Co-sim binary tests | |
| # runs-on: as4 | |
| # needs: build | |
| # steps: | |
| # - name: Run binary tests on backend co-sim config | |
| # run: | | |
| # cd "${CHIPYARD_DIR}" | |
| # source env.sh | |
| # source /ecad/tools/vlsi.bashrc | |
| # cd generators/radiance | |
| # python3 test/run_binary_tests.py -j "$(nproc)" -c backend \ | |
| # --elf-dir cyclotron/test/isa-tests \ | |
| # --json-out test/binary-test-logs/backend/results.json | |
| # - name: Render binary test report | |
| # if: always() | |
| # run: | | |
| # cd "${CHIPYARD_DIR}/generators/radiance" | |
| # python3 test/render_binary_test_report.py \ | |
| # test/binary-test-logs/backend/results.json \ | |
| # --github-step-summary | |
| clean: | |
| name: Clean | |
| runs-on: as4 | |
| needs: [build, run-unit-tests, run-soc-binary-tests, run-tethered-binary-tests, run-tapeout-binary-tests] | |
| if: always() | |
| steps: | |
| - name: Cleanup workspace, chipyard and conda | |
| run: | | |
| [ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}" | |
| [ -d "${CHIPYARD_RUN_ROOT}" ] && rm -rf "${CHIPYARD_RUN_ROOT}" |