LDS transpose load: attention, extended wave configs, regular + transpose load #1857
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: Python Lint and Format Check | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| - 'release/**' | |
| paths: | |
| - "mlir/**" | |
| - "external/**" | |
| - "!external/llvm-project/**" | |
| push: | |
| branches: | |
| - develop | |
| - 'release/**' | |
| paths: | |
| - "mlir/**" | |
| - "external/**" | |
| - "!external/llvm-project/**" | |
| jobs: | |
| py-checks: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: python:3.8 | |
| options: --user root | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fix git ownership | |
| run: | | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r pip_requirements.txt | |
| - name: Get changed Python files under mlir/ | |
| id: changes | |
| shell: bash | |
| run: | | |
| echo "Determining merge base..." | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| BASE_REF="origin/${{ github.base_ref }}" | |
| BASE_BRANCH="${{ github.base_ref }}" | |
| else | |
| BASE_REF="origin/${{ github.ref_name }}" | |
| BASE_BRANCH="${{ github.ref_name }}" | |
| fi | |
| echo "BASE_REF=$BASE_REF" | |
| echo "BASE_BRANCH=$BASE_BRANCH" | |
| # Fetch the base branch explicitly | |
| git fetch origin "$BASE_BRANCH:refs/remotes/origin/$BASE_BRANCH" || \ | |
| git fetch origin "$BASE_BRANCH" || true | |
| # Verify that BASE_REF exists locally | |
| if ! git rev-parse --verify "$BASE_REF" >/dev/null 2>&1; then | |
| echo "Error: Base ref '$BASE_REF' does not exist locally. Fetch may have failed." >&2 | |
| exit 1 | |
| fi | |
| BASE_SHA=$(git merge-base HEAD "$BASE_REF") | |
| echo "BASE_SHA=$BASE_SHA" | |
| # Get added/modified Python files under mlir/ (space-separated) | |
| files=$(git diff --name-only --diff-filter=AM "$BASE_SHA"...HEAD \ | |
| | grep -E '^mlir/.*\.py$' | tr '\n' ' ' || true) | |
| echo "files=$files" >> $GITHUB_OUTPUT | |
| echo "Changed Python files:" | |
| echo "$files" | |
| - name: Run flake8 | |
| if: steps.changes.outputs.files != '' | |
| run: | | |
| files="${{ steps.changes.outputs.files }}" | |
| if [ -n "$files" ]; then | |
| flake8 --ignore=E501,E251,E124,W605,W504,E131,E126,W503,E123 $files | |
| fi | |
| - name: Run YAPF check | |
| if: steps.changes.outputs.files != '' | |
| run: | | |
| files="${{ steps.changes.outputs.files }}" | |
| if [ -n "$files" ]; then | |
| yapf --diff $files \ | |
| || (echo "Format issues found. Fix locally with: yapf -i <files>"; exit 1) | |
| fi | |
| - name: No Python changes in mlir/ | |
| if: steps.changes.outputs.files == '' | |
| run: echo "No changed *.py files under mlir/ – skipping." |