Repository navigation
Expand file tree
/
Copy pathflash-linear-attention-examples.yml
More file actions
72 lines (67 loc) · 3.31 KB
/
Copy pathflash-linear-attention-examples.yml
File metadata and controls
72 lines (67 loc) · 3.31 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
# flash-linear-attention examples guard - project thin trigger.
#
# Calls the common engine .github/workflows/examples-template.yml;
# this file only declares what varies per project: schedule,
# concurrency, upstream repo, dispatch input forwarding, and matrix
# parallelism. The guard loop (release + workflow-files monitor /
# manifest-check / run-example matrix / validate-results /
# save-monitor-state) lives in the engine. See examples-guards/README.md
# for the design. The guarded example is project-owned
# (examples-guards/flash-linear-attention/example/train_text.py), run
# against the upstream release installed from the target checkout.
name: flash-linear-attention-examples
concurrency:
# Three groups: schedule runs serialize (a run cancelled mid-way
# loses its outcome writeback, and the outcome drives the next
# cycle's retry); each PR serializes per number so a new push
# cancels the stale run instead of queueing another matrix on the
# NPU runners; each manual run stands alone. Group names are
# repository-wide, so the PR group carries the workflow name: a bare
# pr-<number> would let two projects' runs on one PR cancel each
# other.
group: ${{ github.event_name == 'schedule' && 'flash-linear-attention-examples-schedule' || (github.event_name == 'pull_request' && format('flash-linear-attention-examples-pr-{0}', github.event.pull_request.number)) || format('manual-{0}', github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
# Daily at 02:00 Beijing time (UTC 18:00). The engine's monitor gates
# actual runs on upstream release / guard-file changes, so the cadence
# only bounds detection latency.
schedule:
- cron: '0 18 * * *'
workflow_dispatch:
inputs:
target_ref:
description: Branch, tag, or SHA to test (empty = latest upstream release; falls back to main on API failure)
required: false
default: ''
type: string
# PR runs need no merge: GitHub executes the workflow files from the
# PR merge ref, so a newly added trigger and engine run on the PR
# that adds them. Whether a fork PR waits for a maintainer's approval
# first is the repository's fork-PR policy. `pull_request`, not
# `pull_request_target`: the declared read permissions are all the
# engine needs. paths lists only this project's files, as the
# quick-start triggers do: a PR that touches only the shared engine,
# scripts or schema starts no project's matrix.
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
paths:
- 'examples-guards/flash-linear-attention/**'
- '.github/workflows/flash-linear-attention-examples.yml'
# Engine jobs query the GitHub Job API (validate-results); called
# workflows run with the caller's GITHUB_TOKEN permissions.
permissions:
actions: read
contents: read
jobs:
flash-linear-attention-examples:
uses: ./.github/workflows/examples-template.yml
with:
# Namespaces cache keys (examples-monitor-state-flash-linear-attention_*),
# artifact names and the scheduling paths under
# examples-guards/flash-linear-attention.
project: flash-linear-attention
upstream_repo: fla-org/flash-linear-attention
target_ref: ${{ inputs.target_ref }}
# Single supported example today; one NPU runner leg at a time.
max_parallel: 1