add LoRALayer (#472) #1400
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: PR Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "epic/*" | |
| paths: | |
| - "python/**" | |
| - "scripts/**" | |
| - "test/**" | |
| - ".github/workflows/pr-test.yml" | |
| pull_request: | |
| branches: | |
| - main | |
| - "epic/*" | |
| paths: | |
| - "python/**" | |
| - "scripts/**" | |
| - "test/**" | |
| - ".github/workflows/pr-test.yml" | |
| concurrency: | |
| group: pr-test-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # =============================================== check changes ==================================================== | |
| check-changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| main_package: ${{ steps.filter.outputs.main_package }} | |
| pallas_kernel: ${{ steps.filter.outputs.pallas_kernel }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| # TODO: use run-ci label when sglang-jax-bot exists | |
| # - name: Fail if the PR does not have the 'run-ci' label | |
| # if: github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'run-ci') | |
| # run: | | |
| # echo "This pull request does not have the 'run-ci' label. Failing the workflow." | |
| # exit 1 | |
| - name: Fail if the PR is a draft | |
| if: github.event_name == 'pull_request' && github.event.pull_request.draft == true | |
| run: | | |
| echo "This pull request is a draft. Failing the workflow." | |
| exit 1 | |
| - name: Detect file changes | |
| id: filter | |
| uses: dorny/paths-filter@v3 | |
| with: | |
| filters: | | |
| main_package: | |
| - "python/sgl_jax/**" | |
| - "python/*.toml" | |
| - "scripts/**" | |
| - "test/**" | |
| - ".github/workflows/pr-test.yml" | |
| pallas_kernel: | |
| - "python/sgl_jax/kernels/**" | |
| - "benchmark/kernels/**" | |
| - ".github/workflows/pr-test.yml" | |
| # =============================================== unit-test ==================================================== | |
| unit-test-1-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-1 | |
| #runs-on: ubuntu-slim | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0, 1] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Run unit test | |
| timeout-minutes: 30 | |
| shell: bash | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| python test/srt/run_suite.py --suite unit-test-tpu-v6e-1 --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 | |
| unit-test-4-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0, 1] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Run unit test | |
| timeout-minutes: 30 | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite unit-test-tpu-v6e-4 --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 | |
| # =============================================== e2e-test =============================================== | |
| e2e-test-1-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Run e2e test | |
| timeout-minutes: 120 | |
| shell: bash | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite e2e-test-tpu-v6e-1 --auto-partition-id ${{ matrix.part }} --auto-partition-size 1 | |
| e2e-test-4-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0, 1] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Run e2e test | |
| timeout-minutes: 120 | |
| shell: bash | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite e2e-test-tpu-v6e-4 --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 | |
| # =============================================== accurancy-test =============================================== | |
| accurancy-test-1-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Evaluate accuracy | |
| timeout-minutes: 20 | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite accuracy-test-tpu-v6e-1 --auto-partition-id ${{ matrix.part }} --auto-partition-size 1 | |
| accurancy-test-4-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Evaluate MoE accuracy (TP=4) | |
| timeout-minutes: 50 | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite accuracy-test-tpu-v6e-4 --timeout-per-file 3000 --auto-partition-id ${{ matrix.part }} --auto-partition-size 1 | |
| # =============================================== performance-test =============================================== | |
| performance-test-1-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Benchmark performance | |
| timeout-minutes: 30 | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite performance-test-tpu-v6e-1 --auto-partition-id ${{ matrix.part }} --auto-partition-size 1 | |
| performance-test-4-tpu: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.main_package == 'true' | |
| runs-on: arc-runner-v6e-4 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0, 1] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Benchmark performance (tp=4) | |
| timeout-minutes: 50 | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| bash scripts/killall_sglang.sh | |
| python test/srt/run_suite.py --suite performance-test-tpu-v6e-4 --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 --timeout-per-file 3000 | |
| # =============================================== kernel-benchmark =============================================== | |
| pallas-kernel-benchmark: | |
| needs: [check-changes] | |
| if: github.event.pull_request.draft == false && needs.check-changes.outputs.pallas_kernel == 'true' | |
| runs-on: arc-runner-v6e-1 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| part: [0, 1] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Run test | |
| timeout-minutes: 120 | |
| shell: bash | |
| env: | |
| SGLANG_JAX_IS_IN_CI: true | |
| run: | | |
| python3.12 -m venv .venv | |
| source .venv/bin/activate | |
| pip install uv | |
| uv pip install -e "python[all]" | |
| python test/srt/run_suite.py --suite kernel-performance-test-tpu-v6e-1 --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 | |
| pr-test-finish: | |
| needs: [ | |
| performance-test-1-tpu, | |
| performance-test-4-tpu, | |
| accurancy-test-1-tpu, | |
| accurancy-test-4-tpu, | |
| unit-test-1-tpu, | |
| unit-test-4-tpu, | |
| e2e-test-1-tpu, | |
| e2e-test-4-tpu, | |
| pallas-kernel-benchmark, | |
| ] | |
| runs-on: arc-runner-v6e-1 | |
| steps: | |
| - name: Check all dependent job statuses | |
| run: | | |
| results=(${{ join(needs.*.result, ' ') }}) | |
| for result in "${results[@]}"; do | |
| if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then | |
| echo "Job failed with result: $result" | |
| exit 1 | |
| fi | |
| done | |
| echo "All jobs completed successfully" | |
| exit 0 |