-
-
Notifications
You must be signed in to change notification settings - Fork 3
81 lines (71 loc) · 2.44 KB
/
Copy pathwindows_amd64_tests.yaml
File metadata and controls
81 lines (71 loc) · 2.44 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
name: "Tests(windows/amd64)"
permissions:
# read|write|none
actions: read
checks: read
contents: write
deployments: read
# id-token: read --> doesn't work
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: windows-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v6
- name: Install Go
uses: actions/setup-go@v6
with:
go-version: "1.26.x"
- name: "Diagnostic: Check CPU Features"
run: |
echo "Checking CPU for AVX-512 support..."
powershell -Command "Get-CimInstance Win32_Processor | Select-Object -ExpandProperty Caption"
# Check for AVX-512 explicitly via PowerShell
powershell -Command "if ((Get-WmiObject Win32_Processor).Caption -match 'AVX512') { echo 'AVX-512 Detected' } else { echo 'AVX-512 NOT supported' }"
- name: Test with AutoInstall CPU PJRT plugin
run: |
go test ./compute/xla -test.v -test.count=1
- name: "Diagnostic: Debug DLL Imports"
if: failure()
run: |
# Find where the DLL was installed (usually ~/AppData/Local/go-xla)
DLL_PATH="${HOME}/AppData/Local/go-xla/pjrt_c_api_cpu_plugin.dll"
if [ -f "$DLL_PATH" ]; then
echo "Analyzing $DLL_PATH"
# Use dumpbin (available on windows-latest) to see what DLLs are missing
# If any DLL says "NOT FOUND", that is your culprit.
dumpbin /DEPENDENTS "$DLL_PATH"
else
echo "DLL not found at $DLL_PATH"
fi
- name: Install PJRT plugin
run: |
(cd ./cmd/pjrt_installer && go work init && go work use . '..\..' && go install .)
export CPU_VERSION="$(sed -n 's/.*var DefaultCPUVersion = "\(.*\)".*/\1/p' ./internal/utils/utils.go)"
env GH_TOKEN=$GH_TOKEN $(go env GOPATH)/bin/pjrt_installer -plugin cpu -version "${CPU_VERSION}" -path '~\AppData\Local\go-xla'
echo "Contents for go-xla:"
ls -la "${HOME}/AppData/Local/go-xla"
echo "-----------"
echo
- name: Test
run: |
go test ./...