forked from tile-ai/tilelang
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (95 loc) · 3.24 KB
/
ci-paddle.yml
File metadata and controls
106 lines (95 loc) · 3.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CI Paddle
on:
push:
branches: [paddle]
tags: ["v*"]
pull_request:
merge_group:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
test:
name: Test
runs-on:
group: H20
timeout-minutes: 30
env:
container_name: tilelang-paddle-test-${{ github.run_id }}
steps:
- name: Check docker image and run container
env:
FLAGS_fraction_of_gpu_memory_to_use: 0.15
CTEST_PARALLEL_LEVEL: 2
WITH_GPU: "ON"
CUDA_ARCH_NAME: Hopper
WITH_AVX: "ON"
PY_VERSION: "3.10"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPU_DEVICES: 3
no_proxy: "bcebos.com,apiin.im.baidu.com,gitee.com,aliyun.com,.baidu.com,.tuna.tsinghua.edu.cn"
run: |
docker_image=ccr-2vdh3abv-pub.cnc.bj.baidubce.com/paddlepaddle/paddle:cuda129-coverage-test
docker run -d -t --gpus device=${GPU_DEVICES} --name ${{ env.container_name }} \
-v "/dev/shm:/dev/shm" \
-v ${{ github.workspace }}/../../..:${{ github.workspace }}/../../.. \
-v ${{ github.workspace }}:/workspace \
-e FLAGS_fraction_of_gpu_memory_to_use \
-e CTEST_PARALLEL_LEVEL \
-e WITH_GPU \
-e CUDA_ARCH_NAME \
-e WITH_AVX \
-e PY_VERSION \
-e GITHUB_TOKEN \
-e no_proxy \
-w /workspace \
--network host \
${docker_image}
- name: Checkout repository
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
set -e
source ${{ github.workspace }}/../../../proxy
git config --global --add safe.directory "*"
# Clean workspace
find . -maxdepth 1 ! -name "." -exec rm -rf {} +
# Checkout
git init
git remote add origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git fetch origin ${{ github.ref }} --depth=1
git checkout FETCH_HEAD
git submodule update --init --recursive
'
- name: Install dependencies
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
set -e
source ${{ github.workspace }}/../../../proxy
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source $HOME/.local/bin/env
# Create and activate virtual environment
uv venv .venv --seed
source .venv/bin/activate
# Install paddle
uv pip install --pre paddlepaddle-gpu -i https://www.paddlepaddle.org.cn/packages/nightly/cu129/
# Install project and minimal test runner
uv pip install pytest
uv pip install -e .
'
- name: Run tests
run: |
docker exec -t ${{ env.container_name }} /bin/bash -c '
set -e
source .venv/bin/activate
pytest tests_paddle/
'
- name: Terminate and delete the container
if: always()
run: |
set +e
docker stop ${{ env.container_name }}
docker rm ${{ env.container_name }}