[tuner] update the calculation of shared memory usage #71
Workflow file for this run
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
| # Copyright 2024 Advanced Micro Devices, Inc. | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| name: CI - amdsharktuner | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/ci-amdsharktuner.yml' | |
| - 'amdsharktuner/**' | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/ci-amdsharktuner.yml' | |
| - 'amdsharktuner/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| name: "Unit Tests (py${{ matrix.tuner-python-version }}, ${{ matrix.runs-on }})" | |
| strategy: | |
| matrix: | |
| tuner-python-version: ["3.10.12"] | |
| mypy-python-version: ["3.11"] | |
| runs-on: [ubuntu-24.04] | |
| runs-on: ${{matrix.runs-on}} | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| PIP_CACHE_DIR: "${{ github.workspace }}/.pip-cache" | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - name: Set up Python | |
| id: setup_python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: ${{matrix.tuner-python-version}} | |
| - name: Cache pip packages | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| id: cache-pip | |
| with: | |
| path: ${{ env.PIP_CACHE_DIR }} | |
| key: pip-${{ steps.setup_python.outputs.python-version }}-${{ hashFiles('amdsharktuner/requirements*.txt') }} | |
| - name: Install dev dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r amdsharktuner/requirements-dev.txt | |
| - name: Install amdsharktuner dependencies | |
| run: | | |
| pip install -r amdsharktuner/requirements-iree.txt | |
| pip install -r amdsharktuner/requirements.txt | |
| pip install --no-compile \ | |
| -r amdsharktuner/requirements-test.txt \ | |
| -e amdsharktuner/ | |
| pip freeze | |
| - name: Run mypy type checker | |
| run: mypy amdsharktuner --python-version ${{ matrix.mypy-python-version }} | |
| - name: Run amdsharktuner tests with coverage | |
| run: | | |
| pytest amdsharktuner/ \ | |
| --cov=amdsharktuner \ | |
| --cov-report xml:amdsharktuner-cov.xml \ | |
| --cov-config=.coveragerc \ | |
| -v | |
| env: | |
| COVERAGE_FILE: .coverage.amdsharktuner | |
| - name: Upload coverage data | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: coverage-data-amdsharktuner | |
| path: .coverage.amdsharktuner | |
| include-hidden-files: true | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-24.04 | |
| needs: test | |
| if: github.event.pull_request.number != 2677 # Skip for large PR that exceeds GitHub's 300-file diff limit | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| actions: read | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0 | |
| id: download | |
| with: | |
| name: coverage-data-amdsharktuner | |
| - name: Coverage comment | |
| id: coverage_comment | |
| uses: py-cov-action/python-coverage-comment-action@91910686861e4e1d8282a267a896eb39d46240fb # v3.35 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| MERGE_COVERAGE_FILES: true | |
| MINIMUM_GREEN: 90 | |
| MINIMUM_ORANGE: 70 | |
| - name: Store Pull Request comment to be posted | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' | |
| with: | |
| name: python-coverage-comment-action | |
| path: python-coverage-comment-action.txt |