-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
69 lines (61 loc) · 1.96 KB
/
Copy pathaction.yml
File metadata and controls
69 lines (61 loc) · 1.96 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
name: coldpath
description: Fail the build if your Arm binaries cannot execute the chip's matrix instructions.
author: Jonathan
branding:
icon: cpu
color: blue
inputs:
path:
description: Binary, directory, or archive (.whl, .apk, .tar.gz) to scan.
required: true
require:
description: Fail if any scanned binary lacks this feature (sme, i8mm, bf16, dotprod).
required: false
default: i8mm
any:
description: >-
With require, pass if ANY scanned binary has the feature, not every one. Use for a release
whose matmul lives in one backend library among launcher shims, or that dlopens the best of
several single-ISA variants at runtime.
required: false
default: 'false'
fail-on-cold:
description: If false, report but never fail the job.
required: false
default: 'true'
outputs:
verdict:
description: HOT (SME) / WARM (i8mm) / TEPID (dotprod) / COLD (nothing)
value: ${{ steps.scan.outputs.verdict }}
report:
description: JSON report.
value: ${{ steps.scan.outputs.report }}
runs:
using: composite
steps:
- shell: bash
run: pip install --quiet coldpath
- id: scan
shell: bash
run: |
set -o pipefail
coldpath "${{ inputs.path }}" | tee report.txt
coldpath "${{ inputs.path }}" --json > report.json
{
echo 'report<<EOF'
cat report.json
echo EOF
} >> "$GITHUB_OUTPUT"
VERDICT=$(python -c "import json;print(json.load(open('report.json'))['binaries'][0]['verdict'])")
echo "verdict=$VERDICT" >> "$GITHUB_OUTPUT"
{
echo "## coldpath: \`$VERDICT\`"
echo '```'
cat report.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
if [ "${{ inputs.fail-on-cold }}" = "true" ]; then
ANY=""
[ "${{ inputs.any }}" = "true" ] && ANY="--any"
coldpath "${{ inputs.path }}" --require "${{ inputs.require }}" $ANY --quiet
fi