-
Notifications
You must be signed in to change notification settings - Fork 55
108 lines (94 loc) · 3.78 KB
/
tsingmicro-build-and-test.yml
File metadata and controls
108 lines (94 loc) · 3.78 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
107
108
name: Tsingmicro-Build-And-Test
on:
push:
branches: [ "triton_v3.3.x" ]
pull_request:
branches: [ "triton_v3.3.x" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tsingmicro-build-and-test:
runs-on: flagtree-tsingmicro
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
shell: bash
run: |
source ~/env.sh
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before checkout2
if: steps.checkout1.outcome == 'failure'
run: |
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
sleep 120
- name: Checkout code (attempt 2)
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before final checkout
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
run: |
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
sleep 180
- name: Checkout code (final attempt)
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Verify checkout success
if: success()
run: echo "Checkout completed successfully"
- name: Check if only docs files changed
id: check_files
uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main
- name: FlagTree Build on Tsingmicro
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
source ~/env.sh
export FLAGTREE_BACKEND=tsingmicro
cd python
python3 -m pip install . --no-build-isolation
- name: FlagTree Test on Tsingmicro
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
source ~/env.sh
export TX8_DEPS_ROOT=~/.flagtree/tsingmicro/tx8_deps
export LLVM_SYSPATH=~/.flagtree/tsingmicro/tsingmicro-llvm21-glibc2.30-glibcxx3.4.28-python3.10-x64
export LLVM_BINARY_DIR=${LLVM_SYSPATH}/bin
export PYTHONPATH=${LLVM_SYSPATH}/python_packages/mlir_core:$PYTHONPATH
export LD_LIBRARY_PATH=$TX8_DEPS_ROOT/lib:$LD_LIBRARY_PATH
# tsingmicro
pushd third_party/tsingmicro/examples
python3 bare_matmul_autotune.py >result-bare_matmul_autotune.txt
python3 embedding.py >result-embedding.txt
python3 mult_ir.py >result-mult_ir.txt
python3 profile_matmul.py >result-profile_matmul.txt
python3 quant_gptq.py >result-quant_gptq.txt
python3 test_cos.py >result-test_cos.txt
python3 test_embedding.py >result-test_embedding.txt
python3 test_flip.py >result-test_flip.txt
python3 test_layernorm.py >result-test_layernorm.txt
python3 test_matmul.py >result-test_matmul.txt
python3 test_print.py >result-test_print.txt
python3 test_softmax.py >result-test_softmax.txt
python3 test_vec_add.py >result-test_vec_add.txt
python3 time1.py >result-time1.txt
popd
# tle on tsingmicro
pushd third_party/tsingmicro/examples/tle
python3 test_tle_dsa_noc_gemm_4096.py >result-noc_gemm.txt
popd