forked from Rust-GPU/rust-gpu.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
62 lines (59 loc) · 2.51 KB
/
Cargo.toml
File metadata and controls
62 lines (59 loc) · 2.51 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
[workspace]
members = [
#
# ---- The rust code that runs on the GPU. ----
# Often called "shaders" (in graphics) or "kernels" (in compute).
#
"crates/gpu/naive",
"crates/gpu/workgroup_256",
"crates/gpu/workgroup_2d",
"crates/gpu/tiling_1d",
"crates/gpu/tiling_1d_loop",
"crates/gpu/tiling_2d",
#
# ---- The rust code that runs both on the GPU and the CPU. ----
# It "knows" what platform it is being compiled for and can conditionally change
# logic and dependencies using standard rust idioms.
#
# 1) Shared constants and settins used by both the CPU and GPU.
"crates/shared/settings",
# 2) An example of a program that can run unmodified on both the CPU and the GPU.
"crates/shared/isomorphic",
#
# ---- The rust code that runs on the CPU. ----
#
# 1) The CPU library that contains the matrix multiplication implementation. It
# loads the compiled GPU program, sends it to the GPU, pushes data to the GPU,
# tells the GPU to execute, then reads the results back.
"crates/cpu/matmul",
# 2) The compiled GPU program that the CPU loads and sends to the GPU to execute.
"crates/cpu/compiled_for_gpu/naive",
"crates/cpu/compiled_for_gpu/workgroup_256",
"crates/cpu/compiled_for_gpu/workgroup_2d",
"crates/cpu/compiled_for_gpu/tiling_1d",
"crates/cpu/compiled_for_gpu/tiling_1d_loop",
"crates/cpu/compiled_for_gpu/tiling_2d",
"crates/cpu/compiled_for_gpu/isomorphic",
# 3) A binary that runs on the CPU. It configures the `matmul` library on the CPU
# and then tells it to run the matrix multiplication.
"bin/blog",
# 4) A binary that runs on the CPU. It compiles other libraries that run on the CPU
# and benchmarks them.
"benches"
]
resolver = "2"
[workspace.lints.rust]
unexpected_cfgs = { level = "allow", check-cfg = ['cfg(target_arch, values("spirv"))'] }
[workspace.dependencies]
spirv-std = { git = "https://github.com/rust-gpu/rust-gpu", rev = "05042d1713012862be103e85bfd2c15dfeccda7b" }
futures = "0.3"
glam = { version = "0.29.2", features = ["cuda", "bytemuck"] }
tracing = "0.1.40"
wgpu = { version = "23.0", features = ["spirv", "vulkan-portability"] }
# Enable incremental by default in release mode.
[profile.release]
incremental = true
# This is the default but without explicitly specifying it, Cargo
# will treat the identical settings in `[profile.release.build-override]` below
# as different sets of `rustc` flags and will not reuse artifacts between them.
codegen-units = 256