Initial version of test case for streamk with mxfp4 data type #24468
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: pre-commit | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - release/therock-* | |
| pull_request: | |
| branches: [develop] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| # For PRs, group by PR number so a new commit cancels any in-progress run | |
| # for the same PR. For postsubmits, group by commit SHA (unique per commit) | |
| # so runs never cancel each other. The workflow name is prepended to avoid | |
| # conflicts between different workflows. | |
| group: ${{ github.workflow }}-${{ github.event.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| # For PRs, diff against the base branch. For pushes, diff against the | |
| # commit that existed before the push (github.event.before). | |
| FROM_REF: ${{ github.event.pull_request.base.ref && format('origin/{0}', github.event.pull_request.base.ref) || github.event.before }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # 0 fetches all commit history for --from-ref/--to-ref to function | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| - name: Detect project changes | |
| id: changes | |
| env: | |
| # Add project names here (one per line) to enable conditional dependency installation | |
| PROJECTS_WITH_OPTIONAL_DEPS: >- | |
| hipdnn | |
| run: | | |
| CHANGED_FILES=$(git diff --name-only ${FROM_REF}...HEAD) | |
| # Check each project for changes | |
| for project in $PROJECTS_WITH_OPTIONAL_DEPS; do | |
| if echo "$CHANGED_FILES" | grep -qE "^(projects|shared)/$project/"; then | |
| echo "${project}_changed=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "${project}_changed=false" >> $GITHUB_OUTPUT | |
| fi | |
| done | |
| # To install optional deps for a project: | |
| # 1. Add project name to PROJECTS_WITH_OPTIONAL_DEPS above | |
| # 2. Like the example below, add an install step conditional on: | |
| # - steps.changes.outputs.<project-name>_changed == 'true' | |
| - name: Install hipDNN dependencies | |
| if: steps.changes.outputs.hipdnn_changed == 'true' | |
| run: | | |
| wget -q https://github.com/google/flatbuffers/releases/download/v25.9.23/Linux.flatc.binary.g++-13.zip | |
| unzip -q Linux.flatc.binary.g++-13.zip | |
| sudo mv flatc /usr/local/bin/ | |
| sudo chmod +x /usr/local/bin/flatc | |
| rm Linux.flatc.binary.g++-13.zip | |
| - uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1 | |
| with: | |
| # Only check changed files in the PR/push | |
| extra_args: --from-ref ${{ env.FROM_REF }} --to-ref HEAD |