-
Notifications
You must be signed in to change notification settings - Fork 25
210 lines (177 loc) · 5.23 KB
/
examples.yml
File metadata and controls
210 lines (177 loc) · 5.23 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
name: Examples
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
permissions:
contents: read
jobs:
skala-checkpoint:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v6
with:
version: "3.x"
- name: Install huggingface_hub CLI
run: pip install huggingface_hub
- name: Download checkpoint
run: >-
hf download microsoft/skala skala-1.0.fun --local-dir .
- name: Upload checkpoint
uses: actions/upload-artifact@v4
with:
name: skala-checkpoint
path: skala-1.0.fun
pt-features:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment-cpu.yml
environment-name: skala-dev
cache-environment: true
cache-downloads: true
- name: Install Skala
run: pip install -e .
shell: micromamba-shell {0}
- name: Generate features
run: >-
python examples/cpp/cpp_integration/prepare_inputs.py
--output-dir features
shell: micromamba-shell {0}
- name: Upload features
uses: actions/upload-artifact@v4
with:
name: pt-features
path: features
gauxc:
needs:
- skala-checkpoint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: ["openmp", "mpi"]
gauxc: ["release", "main"]
example: ["cpp", "c", "fortran"]
steps:
- uses: actions/checkout@v4
with:
path: skala
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: skala/examples/${{ matrix.example }}/gauxc_integration/environment-${{ matrix.toolchain }}.yml
environment-name: gauxc-dev
cache-environment: true
cache-downloads: true
- uses: actions/checkout@v4
with:
repository: wavefunction91/gauxc
ref: skala
path: gauxc
- name: Configure GauXC
if: ${{ matrix.gauxc == 'release' }}
run: >-
cmake
-B build_gauxc
-S gauxc
-G Ninja
-DGAUXC_ENABLE_OPENMP=${{ matrix.toolchain == 'openmp' }}
-DGAUXC_ENABLE_MPI=${{ matrix.toolchain == 'mpi' }}
-DGAUXC_ENABLE_CUDA=${{ matrix.toolchain == 'cuda' }}
-DGAUXC_ENABLE_ONEDFT=ON
-DGAUXC_ENABLE_C=${{ matrix.example == 'c' || matrix.example == 'fortran' }}
-DGAUXC_ENABLE_FORTRAN=${{ matrix.example == 'fortran' }}
-DBUILD_SHARED_LIBS=ON
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
shell: micromamba-shell {0}
- name: Build GauXC
if: ${{ matrix.gauxc == 'release' }}
run: cmake --build build_gauxc
shell: micromamba-shell {0}
- name: Install GauXC
if: ${{ matrix.gauxc == 'release' }}
run: cmake --install build_gauxc
shell: micromamba-shell {0}
- name: Configure project
run: >-
cmake
-B build_example
-S skala/examples/${{ matrix.example }}/gauxc_integration
-G Ninja
-DSkala_GauXC_ENABLE_OPENMP=${{ matrix.toolchain == 'openmp' }}
-DSkala_GauXC_ENABLE_MPI=${{ matrix.toolchain == 'mpi' }}
-DSkala_GauXC_ENABLE_CUDA=${{ matrix.toolchain == 'cuda' }}
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
shell: micromamba-shell {0}
- name: Build project
run: cmake --build build_example
shell: micromamba-shell {0}
- name: Install project
run: cmake --install build_example
shell: micromamba-shell {0}
- name: Run example
run: >-
Skala
./gauxc/tests/ref_data/onedft_he_def2qzvp_tpss_uks.hdf5
--model TPSS
shell: micromamba-shell {0}
- name: Download checkpoint
uses: actions/download-artifact@v5
with:
name: skala-checkpoint
- name: Run example
run: >-
Skala
./gauxc/tests/ref_data/onedft_he_def2qzvp_tpss_uks.hdf5
--model ./skala-1.0.fun
shell: micromamba-shell {0}
ftorch:
runs-on: ubuntu-latest
needs:
- pt-features
- skala-checkpoint
steps:
- uses: actions/checkout@v4
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: examples/fortran/ftorch_integration/environment.yml
environment-name: ftorch-dev
cache-environment: true
cache-downloads: true
- name: Configure project
run: >-
cmake
-B build_example
-S examples/fortran/ftorch_integration
-G Ninja
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
shell: micromamba-shell {0}
- name: Build project
run: cmake --build build_example
shell: micromamba-shell {0}
- name: Install project
run: cmake --install build_example
shell: micromamba-shell {0}
- name: Download features
uses: actions/download-artifact@v5
with:
name: pt-features
path: features
- name: Download checkpoint
uses: actions/download-artifact@v5
with:
name: skala-checkpoint
path: .
- name: Run example
run: >-
Skala
./skala-1.0.fun
./features
shell: micromamba-shell {0}