-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
107 lines (95 loc) · 2.3 KB
/
Makefile.toml
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
[config]
default_to_workspace = false
[tasks.check]
env = {RUSTFLAGS = "-Z macro-backtrace" }
command = "cargo"
args = ["check", "--all-features", "--all-targets"]
[tasks.format]
dependencies = []
command = "cargo"
args = ["fmt"]
[tasks.kernel]
#toolchain = "nightly"
toolchain = "stage1"
command = "cargo"
args = [
"rustc",
"--lib",
"--no-default-features",
"--release",
"--target=nvptx64-nvidia-cuda",
"--crate-type=cdylib",
"-Z", "build-std=core",
"-Z", "build-std-features=core/panic_immediate_abort",
"--",
"-Cllvm-args=--nvptx-fma-level=2",
"-Cllvm-args=--nvptx-prec-divf32=0",
"-Cllvm-args=--nvptx-prec-sqrtf32=0",
"-Cllvm-args=--nvptx-sched4reg",
"-Cllvm-args=--inline-threshold=1024",
"--emit=asm=src/kernel.ptx,llvm-ir=kernel.ll",
"-Copt-level=3",
# "-Cdebuginfo=line-directives-only",
"-Ctarget-cpu=sm_80",
"-Ctarget-feature=+ptx75",
# "-Z", "trait-solver=next",
"-Z", "no-link",
"-Z", "mir-opt-level=4",
"-Z", "inline-mir=yes",
"-Z", "unsound-mir-opts=yes",
]
[tasks.shader]
# toolchain = "nightly"
toolchain = "stage1"
command = "cargo"
args = [
"rustc",
"--lib",
"--release",
"--target=spirv64-unknown-unknown.json",
"--crate-type=cdylib",
"-Z", "build-std=core",
"-Z", "build-std-features=panic_immediate_abort",
]
[tasks.verify-kernel]
dependencies = ["kernel"]
command = "ptxas"
args = ["-v", "-arch=sm_80", "src/kernel.ptx"]
[tasks.bench]
env = {RUSTFLAGS = "-Ctarget-feature=+fma -Ctarget-cpu=native" }
command = "cargo"
args = ["criterion", "--features=cuda", "-p", "compound_prism_designer"]
# args = ["criterion", "-p", "compound_prism_designer"]
[tasks.test]
command = "cargo"
args = ["test", "--workspace", "--exclude", "compound_prism_designer_kernel"]
[tasks.test-derive]
env = { RUST_BACKTRACE = "full" }
command = "cargo"
args = ["test", "--package", "derive-wrapped-from", "--lib", "--", "--nocapture"]
[tasks.build-python]
command = "maturin"
args = [
"build",
"--release",
"--manylinux=off",
]
[tasks.python-develop]
command = "maturin"
args = [
"develop",
"--release",
]
[tasks.flow-build]
dependencies = [
"format",
"kernel",
"build-python",
]
[tasks.flow-develop]
dependencies = [
"format",
"kernel",
"verify-kernel",
"python-develop",
]