|
| 1 | +name: gemm test reusable workflow |
| 2 | +run-name: ${{ inputs.run_name }} - ${{ inputs.python_version }} - ${{ inputs.runner_label || 'default'}} |
| 3 | + |
| 4 | +on: |
| 5 | + workflow_call: |
| 6 | + inputs: |
| 7 | + device: |
| 8 | + description: Device |
| 9 | + type: string |
| 10 | + default: max1550 |
| 11 | + driver_version: |
| 12 | + description: Driver version |
| 13 | + type: string |
| 14 | + default: rolling |
| 15 | + runner_label: |
| 16 | + description: Runner label, keep empty for default |
| 17 | + type: string |
| 18 | + default: "" |
| 19 | + pytorch_ref: |
| 20 | + description: PyTorch ref, keep empty for default |
| 21 | + type: string |
| 22 | + default: "" |
| 23 | + pytorch_mode: |
| 24 | + description: PyTorch mode, source or wheels |
| 25 | + type: string |
| 26 | + default: "source" |
| 27 | + python_version: |
| 28 | + description: Python version |
| 29 | + type: string |
| 30 | + required: true |
| 31 | + upload_test_reports: |
| 32 | + description: Upload test reports |
| 33 | + type: boolean |
| 34 | + default: false |
| 35 | + ignore_errors: |
| 36 | + description: Ignore test errors |
| 37 | + type: boolean |
| 38 | + default: false |
| 39 | + skip_list: |
| 40 | + description: Skip list |
| 41 | + type: string |
| 42 | + default: "" |
| 43 | + run_name: |
| 44 | + description: Custom run name |
| 45 | + type: string |
| 46 | + default: Build and test |
| 47 | + build_llvm: |
| 48 | + description: Build LLVM |
| 49 | + type: boolean |
| 50 | + default: false |
| 51 | + enable_unskip: |
| 52 | + description: Ignore pytest.skip |
| 53 | + type: boolean |
| 54 | + default: false |
| 55 | + runner_version: |
| 56 | + description: Runner label for version |
| 57 | + type: string |
| 58 | + default: runner-0.0.19 |
| 59 | + |
| 60 | +permissions: read-all |
| 61 | + |
| 62 | +env: |
| 63 | + TRITON_DISABLE_LINE_INFO: 1 |
| 64 | + TEST_UNSKIP: ${{ inputs.enable_unskip }} |
| 65 | + |
| 66 | +jobs: |
| 67 | + integration-tests: |
| 68 | + name: Integration tests |
| 69 | + runs-on: ${{ fromJson(inputs.runner_label && format('["{0}"]', inputs.runner_label) || format('["{0}", "{1}", "{2}"]', inputs.device, inputs.driver_version, inputs.runner_version)) }} |
| 70 | + defaults: |
| 71 | + run: |
| 72 | + shell: bash -noprofile --norc -eo pipefail -c "source /opt/intel/oneapi/setvars.sh > /dev/null; source {0}" |
| 73 | + steps: |
| 74 | + - name: Print inputs |
| 75 | + run: | |
| 76 | + cat <<EOF |
| 77 | + ${{ toJSON(inputs) }} |
| 78 | + EOF |
| 79 | +
|
| 80 | + - name: Checkout repository |
| 81 | + uses: actions/checkout@v4 |
| 82 | + |
| 83 | + - name: Load pip cache |
| 84 | + id: pip-cache |
| 85 | + uses: ./.github/actions/load |
| 86 | + env: |
| 87 | + # Increase this value to reset cache |
| 88 | + CACHE_NUMBER: 1 |
| 89 | + with: |
| 90 | + path: $HOME/.cache/pip |
| 91 | + key: pip-${{ inputs.python_version }}-${{ hashFiles('python/pyproject.toml', 'python/setup.py') }}-${{ env.CACHE_NUMBER }} |
| 92 | + |
| 93 | + - name: Install Python ${{ inputs.python_version }} |
| 94 | + uses: actions/setup-python@v5 |
| 95 | + with: |
| 96 | + python-version: ${{ inputs.python_version }} |
| 97 | + |
| 98 | + - name: Setup PyTorch |
| 99 | + uses: ./.github/actions/setup-pytorch |
| 100 | + with: |
| 101 | + repository: pytorch/pytorch |
| 102 | + ref: ${{ inputs.pytorch_ref }} |
| 103 | + mode: ${{ inputs.pytorch_mode }} |
| 104 | + |
| 105 | + - name: Install pass_rate dependencies |
| 106 | + run: | |
| 107 | + pip install defusedxml |
| 108 | +
|
| 109 | + - name: Setup Triton |
| 110 | + uses: ./.github/actions/setup-triton |
| 111 | + with: |
| 112 | + build_llvm: ${{ inputs.build_llvm }} |
| 113 | + |
| 114 | + - name: Run GEMM Script |
| 115 | + run: | |
| 116 | + python3 test.py |
| 117 | +
|
| 118 | + - name: Report environment details |
| 119 | + run: | |
| 120 | + source ./scripts/capture-hw-details.sh --quiet |
| 121 | + cat <<EOF | tee .env |
| 122 | + TIMESTAMP=$(date '+%Y%m%d%H%M%S') |
| 123 | + GITHUB_RUN_ID=$GITHUB_RUN_ID |
| 124 | + GITHUB_RUN_NUMBER=$GITHUB_RUN_NUMBER |
| 125 | + GITHUB_RUN_ATTEMPT=$GITHUB_RUN_ATTEMPT |
| 126 | + PYTHON_VERSION=${{ inputs.python_version }} |
| 127 | + PYTORCH_REPO=$PYTORCH_REPO |
| 128 | + PYTORCH_COMMIT_ID=$PYTORCH_COMMIT_ID |
| 129 | + PYTORCH_VERSION=$PYTORCH_VERSION |
| 130 | + TRITON_REPO=$GITHUB_REPOSITORY |
| 131 | + LIBIGC1_VERSION=$LIBIGC1_VERSION |
| 132 | + LEVEL_ZERO_VERSION=$LEVEL_ZERO_VERSION |
| 133 | + GPU_DEVICE=$GPU_DEVICE |
| 134 | + AGAMA_VERSION=$AGAMA_VERSION |
| 135 | + EOF |
0 commit comments