feat: Adaptive topk algorithm selection based on input characteristic… #24
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: Triton Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "aiter/ops/triton/**" | |
| - "op_tests/triton_tests/**" | |
| - ".github/workflows/triton-test.yaml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| check-signal: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Download and check signal artifact | |
| run: ./.github/scripts/check_signal.sh | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| triton: | |
| runs-on: aiter-1gpu-runner | |
| needs: [check-signal] | |
| env: | |
| DOCKER_IMAGE: "rocm/pytorch:latest" | |
| TRITON_TEST: "op_tests/triton_tests/" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - name: Clean up Rocm processes | |
| run: | | |
| ./.github/scripts/clean_up_rocm.sh | |
| - name: Run the container | |
| run: | | |
| set -ex | |
| echo "Starting container: triton_test" | |
| if [ -f "/etc/podinfo/gha-render-devices" ]; then | |
| DEVICE_FLAG=$(cat /etc/podinfo/gha-render-devices) | |
| else | |
| DEVICE_FLAG="--device /dev/dri" | |
| fi | |
| docker run -dt \ | |
| --device=/dev/kfd $DEVICE_FLAG \ | |
| --shm-size=16G \ | |
| --group-add $(getent group render | cut -d: -f3) \ | |
| --group-add $(getent group video | cut -d: -f3) \ | |
| -v "${{ github.workspace }}:/workspace" \ | |
| -w /workspace \ | |
| --name triton_test \ | |
| ${{ env.DOCKER_IMAGE }} | |
| - name: Install speedtest-cli and test network | |
| run: | | |
| set -ex | |
| echo "Installing speedtest-cli and testing network..." | |
| docker exec \ | |
| -w /workspace \ | |
| triton_test \ | |
| bash -c "pip install speedtest-cli && speedtest-cli --simple" || true | |
| - name: Setup pip config | |
| run: | | |
| docker exec -u root triton_test bash -c "pip config set global.default-timeout 60" | |
| docker exec -u root triton_test bash -c "pip config set global.retries 10" | |
| - name: Setup Aiter and Triton | |
| run: | | |
| set -ex | |
| echo "Setting up Aiter and Triton..." | |
| docker exec \ | |
| -w /workspace \ | |
| triton_test \ | |
| ./.github/scripts/build_aiter_triton.sh | |
| - name: Install Pytest | |
| run: | | |
| set -ex | |
| echo "Installing Pytest..." | |
| docker exec \ | |
| -w /workspace \ | |
| triton_test \ | |
| pip install pytest | |
| - name: Triton Tests | |
| run: | | |
| set -ex | |
| echo "Running Triton Tests..." | |
| docker exec -w /workspace triton_test mkdir -p test-reports | |
| docker exec -w /workspace triton_test pytest -v ${{ env.TRITON_TEST }} --junitxml=test-reports/triton.xml | |
| - name: Upload test logs | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: triton-test-logs | |
| path: test-reports/triton.xml | |
| - name: Cleanup container | |
| if: always() | |
| run: | | |
| docker rm -f triton_test || true | |
| - name: Clean up Rocm processes | |
| if: always() | |
| run: | | |
| ./.github/scripts/clean_up_rocm.sh |