[tuner] add use_direct_load (Global Load DMA) support to tuner #489
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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Set up Python | |
| id: setup_python | |
| uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 | |
| with: | |
| python-version: ${{matrix.tuner-python-version}} | |
| - name: Cache pip packages | |
| uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 | |
| 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 -W error::pytest.PytestWarning 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| id: download | |
| with: | |
| name: coverage-data-amdsharktuner | |
| - name: Coverage comment | |
| id: coverage_comment | |
| uses: py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc # v3.39 | |
| 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@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' | |
| with: | |
| name: python-coverage-comment-action | |
| path: python-coverage-comment-action.txt |