Skip to content

Commit bd46ced

Browse files
committed
Merge master: resolve conflicts by removing deleted files
2 parents bf48aef + d918d73 commit bd46ced

1,366 files changed

Lines changed: 130052 additions & 33446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/command.yaml

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
name: "ondemand test"
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
permissions:
8+
pull-requests: write
9+
checks: read
10+
contents: read
11+
12+
jobs:
13+
preprocess:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
continue: ${{ steps.check.outputs.continue }}
17+
op: ${{ steps.parse-command.outputs.OP_ID}}
18+
runner: ${{ steps.parse-command.outputs.RUNNER }}
19+
pull: ${{ steps.parse-command.outputs.PR_NUMBER }}
20+
existing: ${{ steps.parse-command.outputs.EXISTING_OP }}
21+
steps:
22+
- id: check
23+
uses: github.qkg1.topmand@v2.0.3
24+
with:
25+
command: "/test"
26+
allowed_contexts: pull_request
27+
allow_forks: "true"
28+
skip_reviews: "true"
29+
fork_review_bypass: "true"
30+
permissions: "write,admin"
31+
32+
- id: parse-command
33+
if: ${{ steps.check.outputs.continue == 'true' }}
34+
env:
35+
PULL_NUMBER: ${{ github.event.issue.number }}
36+
run: |
37+
# Parse command arguments
38+
params=${{ steps.check.outputs.params }}
39+
op=$(echo $params | cut -d ':' -f 1)
40+
runner=$(echo $params | cut -d ':' -f 2)
41+
echo "OP_ID=${op}" >> $GITHUB_OUTPUT
42+
echo "RUNNER=${runner}" >> $GITHUB_OUTPUT
43+
echo "PR_NUMBER=${PULL_NUMBER}" >> $GITHUB_OUTPUT
44+
45+
# Detect if operator exists before
46+
num=$(grep "pytest.mark.${{ needs.preprocess.outputs.op }}" -r tests | wc -l)
47+
if [ "$num" -eq "0" ]; then
48+
echo "EXISTING_OP=1" >> $GITHUB_ENV
49+
else
50+
echo "EXISTING_OP=0" >> $GITHUB_ENV
51+
fi
52+
53+
test-operator:
54+
needs: preprocess
55+
if: needs.preprocess.outputs.continue == 'true'
56+
runs-on: ${{ needs.preprocess.outputs.runner }}
57+
steps:
58+
- id: checkout-attempt-1
59+
uses: actions/checkout@v6
60+
continue-on-error: true
61+
- id: sleep-1
62+
if: steps.checkout-attempt-1.outcome == 'failure'
63+
shell: bash
64+
run: sleep 30s
65+
66+
- id: checkout-attempt-2
67+
if: steps.checkout-attempt-1.outcome == 'failure'
68+
uses: actions/checkout@v6
69+
continue-on-error: true
70+
- id: sleep-2
71+
if: steps.checkout-attempt-2.outcome == 'failure'
72+
shell: bash
73+
run: sleep 30s
74+
75+
- id: checkout-attempt-3
76+
if: steps.checkout-attempt-2.outcome == 'failure'
77+
uses: actions/checkout@v6
78+
79+
- id: checkout-pr
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
echo "checking out ${{ needs.preprocess.outputs.pull }}"
84+
gh pr checkout ${{ needs.preprocess.outputs.pull }}
85+
86+
- name: Setup FlagGems
87+
shell: bash
88+
env:
89+
RUNNER_LABEL: ${{ needs.preprocess.outputs.runner }}
90+
run: |
91+
# Validate vendor names
92+
case "${RUNNER_LABEL}" in
93+
h20)
94+
VENDOR="nvidia"
95+
;;
96+
moore)
97+
VENDOR="mthreads"
98+
;;
99+
*)
100+
VENDOR="${RUNNER_LABEL}"
101+
;;
102+
esac
103+
104+
echo "VENDOR=${VENDOR}"
105+
echo "VENDOR=${VENDOR}" >> $GITHUB_ENV
106+
107+
./setup.sh ${VENDOR}
108+
109+
- name: Check GPU availability
110+
shell: bash
111+
run: |
112+
bash "tools/gpu_check_${VENDOR}.sh"
113+
114+
- name: Run tests
115+
shell: bash
116+
env:
117+
EXISTING_OP: ${{ needs.preprocess.outputs.existing }}
118+
run: |
119+
source .venv/bin/activate
120+
source tools/set-env.sh ${VENDOR}
121+
tools/run_tests.py --ops ${{ needs.preprocess.outputs.op }} \
122+
--dump-output \
123+
--output-dir results_new
124+
125+
if [ "$EXISTING_OP" == "0" ]; then
126+
tools/psum_text --format markdown \
127+
--output report.md \
128+
--single \
129+
results_new
130+
mv results_new results
131+
else
132+
git checkout master
133+
tools/run_tests.py --ops ${{ needs.preprocess.outputs.op }} \
134+
--dump-output \
135+
--output-dir results_old
136+
137+
# merge two data sets into one directory
138+
mkdir results
139+
mv results_old results/before
140+
mv results_new results/after
141+
142+
tools/psum_text --format markdown \
143+
--single \
144+
--compare \
145+
--output report.md \
146+
results
147+
fi
148+
149+
- name: Upload results
150+
uses: actions/upload-artifact@v7
151+
with:
152+
name: ondemand-test
153+
path: results/
154+
155+
- name: comment
156+
uses: mshick/add-pr-comment@v3
157+
with:
158+
message-path: report.md
159+
message-id: ${{ needs.preprocess.outputs.op }}-${{ needs.preprocess.outputs.runner }}
160+
allow-repeats: True
161+
attach-path: results/*
162+
attach-name: report-${{ needs.preprocess.outputs.op }}-${{ needs.preprocess.outputs.runner }}
163+
attach-text: '📎 [Download %ATTACH_NAME%](%ARTIFACT_URL%)'

.github/workflows/coverage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
ref: gh-pages
2727

2828
- id: download
29-
uses: actions/github-script@v8
29+
uses: actions/github-script@v9
3030
with:
3131
result-encoding: string
3232
script: |

.github/workflows/cpp-op-test.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ jobs:
1010
test:
1111
runs-on: cpp
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: Wandalen/wretry.action@3.8.0
14+
with:
15+
action: actions/checkout@v6
16+
attempt_limit: 5
17+
attempt_delay: 20000
1418
- shell: bash
1519
run: |
1620
CXX=/usr/bin/g++-11 CC=/usr/bin/gcc-11 SKBUILD_CMAKE_ARGS="-DFLAGGEMS_BUILD_C_EXTENSIONS=ON" pip install --no-build-isolation -v -e .

.github/workflows/daily.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,30 @@ jobs:
4343
cancel-in-progress: true
4444
runs-on: jiuding
4545
steps:
46-
- uses: actions/checkout@v6
47-
- run: |
48-
pip install pytest-md-report
46+
- id: checkout-attempt-1
47+
uses: actions/checkout@v6
48+
continue-on-error: true
49+
- id: sleep-1
50+
if: steps.checkout-attempt-1.outcome == 'failure'
51+
shell: bash
52+
run: sleep 30s
53+
54+
- id: checkout-attempt-2
55+
if: steps.checkout-attempt-1.outcome == 'failure'
56+
uses: actions/checkout@v6
57+
continue-on-error: true
58+
- id: sleep-2
59+
if: steps.checkout-attempt-2.outcome == 'failure'
60+
shell: bash
61+
run: sleep 30s
62+
63+
- id: checkout-attempt-3
64+
if: steps.checkout-attempt-2.outcome == 'failure'
65+
uses: actions/checkout@v6
66+
4967
- shell: bash
5068
run: tools/gpu_check.sh
69+
5170
- shell: bash
5271
env:
5372
CHANGED_FILES: '__ALL__'

.github/workflows/hugo-site.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ jobs:
121121
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
122122

123123
- name: Upload artifact
124-
uses: actions/upload-pages-artifact@v4
124+
uses: actions/upload-pages-artifact@v5
125125
with:
126126
path: ./docs/public
127127

.github/workflows/random-test.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
name: Random Test
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
runner:
8+
description: "Label for selecting runners"
9+
required: true
10+
type: string
11+
operators:
12+
description: "Operators (comma separated names)"
13+
required: true
14+
type: string
15+
gpus:
16+
description: "GPUs (comma separated numbers)"
17+
required: true
18+
type: string
19+
permissions:
20+
contents: read
21+
22+
jobs:
23+
check-permission:
24+
runs-on: ubuntu-latest
25+
outputs:
26+
authorized: ${{ steps.makeDecision.outputs.continue }}
27+
steps:
28+
- id: checkUser
29+
uses: tspascoal/get-user-teams-membership@v4
30+
with:
31+
username: ${{ github.actor }}
32+
team: 'FlagGems'
33+
GITHUB_TOKEN: ${{ secrets.TEAMMEMBER_TOKEN }}
34+
35+
- id: makeDecision
36+
env:
37+
IS_MEMBER: ${{ steps.checkUser.outputs.isTeamMember }}
38+
run: |
39+
if [[ "${IS_MEMBER}" == "false" ]]; then
40+
echo "Unauthorized user: ${{ github.actor }}"
41+
echo "continue=false" >> $GITHUB_OUTPUT
42+
else
43+
echo "continue=true" >> $GITHUB_OUTPUT
44+
fi
45+
46+
test-operator:
47+
needs: check-permission
48+
if: needs.check-permission.outputs.authorized == 'true'
49+
runs-on: ${{ inputs.runner }}
50+
steps:
51+
- uses: Wandalen/wretry.action@v3.8.0
52+
with:
53+
action: actions/checkout@v6
54+
attempt_limit: 5
55+
attempt_delay: 20000
56+
- name: Setup FlagGems
57+
shell: bash
58+
env:
59+
RUNNER_LABEL: ${{ inputs.runner }}
60+
run: |
61+
# Validate vendor names
62+
case "${RUNNER_LABEL}" in
63+
h20)
64+
VENDOR="nvidia"
65+
;;
66+
moore)
67+
VENDOR="mthreads"
68+
;;
69+
*)
70+
VENDOR="${RUNNER_LABEL}"
71+
;;
72+
esac
73+
74+
echo "VENDOR=${VENDOR}"
75+
echo "VENDOR=${VENDOR}" >> $GITHUB_ENV
76+
77+
./setup.sh ${VENDOR}
78+
79+
- name: Check GPU availability
80+
shell: bash
81+
run: |
82+
bash "tools/gpu_check_${VENDOR}.sh"
83+
84+
- name: Run tests
85+
shell: bash
86+
run: |
87+
source .venv/bin/activate
88+
source tools/set-env.sh ${VENDOR}
89+
tools/run_tests.py --ops ${{ inputs.operators }} --gpus ${{ inputs.gpus }}
90+
91+
- name: Upload results
92+
uses: actions/upload-artifact@v7
93+
with:
94+
name: random-test
95+
path: results/

.github/workflows/triage.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
github_api_url: 'https://api.github.com'
3838
files_to_ignore: ''
3939
- id: identify-pr-type
40-
uses: actions/github-script@v8
40+
uses: actions/github-script@v9
4141
with:
4242
script: |
4343
const prTitle = context.payload.pull_request.title

0 commit comments

Comments
 (0)