-
Notifications
You must be signed in to change notification settings - Fork 3
/
gup.py
39 lines (37 loc) · 1.88 KB
/
gup.py
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
import guppy.v1 as gp
def main():
task_configs = [
(("cuda_10_1", "target-ubuntu_16_04.cached"), (("require_cuda", "10.1"), ("require_distro", "ubuntu 16.04"))),
(("cuda_10_0", "target-ubuntu_16_04.cached"), (("require_cuda", "10.0"), ("require_distro", "ubuntu 16.04"))),
(("cuda_9_2", "target-ubuntu_16_04.cached"), (("require_cuda", "9.2"), ("require_distro", "ubuntu 16.04"))),
(("cuda_9_1", "target-ubuntu_16_04.cached"), (("require_cuda", "9.1"), ("require_distro", "ubuntu 16.04"))),
(("cuda_9_0", "target-ubuntu_16_04.cached"), (("require_cuda", "9.0"), ("require_distro", "ubuntu 16.04"))),
(("cuda_8_0", "target-ubuntu_16_04.cached"), (("require_cuda", "8.0"), ("require_distro", "ubuntu 16.04"))),
(("cuda_7_5", "target-ubuntu_14_04.cached"), (("require_cuda", "7.5"), ("require_distro", "ubuntu 14.04"))),
(("cuda_7_0", "target-ubuntu_14_04.cached"), (("require_cuda", "7.0"), ("require_distro", "ubuntu 14.04"))),
(("cuda_6_5", "target-ubuntu_14_04.cached"), (("require_cuda", "6.5"), ("require_distro", "ubuntu 14.04"))),
]
run = gp.run()
for taskcfg in task_configs:
task_kwargs = dict(taskcfg[1])
run.append(gp.task(
name="{}".format(taskcfg[0][0]),
toolchain="rust_nightly",
**task_kwargs,
sh=[
"CUDA_HOME=/usr/local/cuda RUSTFLAGS=\"-D warnings\" cargo -v test --release --features {} --target-dir {}".format(*taskcfg[0]),
]
))
if taskcfg[0][0] == "cuda_8_0":
# NB: test cuda-sys.
run.append(gp.task(
name="{}+cuda_sys".format(taskcfg[0][0]),
toolchain="rust_nightly",
**task_kwargs,
sh=[
"CUDA_HOME=/usr/local/cuda RUSTFLAGS=\"-D warnings\" cargo -v test --release --features cuda_sys,{} --target-dir {}".format(*taskcfg[0]),
]
))
gp.out(run)
if __name__ == "__main__":
main()