Skip to content

Commit b91eda9

Browse files
committed
abi layout difftest: cuda and scalar-math feature testing
1 parent b7d217e commit b91eda9

File tree

12 files changed

+122
-0
lines changed

12 files changed

+122
-0
lines changed

tests/difftests/tests/Cargo.lock

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/difftests/tests/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ members = [
1818
"storage_class/array_access/array_access-wgsl",
1919
"lang/abi/vector_layout/cpu",
2020
"lang/abi/vector_layout/rust-gpu",
21+
"lang/abi/vector_layout_cuda/cpu",
22+
"lang/abi/vector_layout_cuda/rust-gpu",
23+
"lang/abi/vector_layout_scalar_math/cpu",
24+
"lang/abi/vector_layout_scalar_math/rust-gpu",
2125
"lang/control_flow/control_flow-rust",
2226
"lang/control_flow/control_flow-wgsl",
2327
"lang/control_flow_complex/control_flow_complex-rust",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "abi-vector-layout-scalar-math-cpu"
3+
edition.workspace = true
4+
5+
[lints]
6+
workspace = true
7+
8+
# GPU deps
9+
[dependencies]
10+
abi-vector-layout-cpu = { path = "../../vector_layout/cpu", features = ["cuda"] }
11+
12+
# CPU deps (for the test harness)
13+
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
14+
difftest.workspace = true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use abi_vector_layout_cpu::glam_features::GlamFeatures;
2+
3+
fn main() {
4+
abi_vector_layout_cpu::cpu_driver::run(GlamFeatures::Cuda);
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "abi-vector-layout-scalar-math-rust-gpu"
3+
edition.workspace = true
4+
5+
[lib]
6+
crate-type = ["lib", "dylib"]
7+
8+
[lints]
9+
workspace = true
10+
11+
[dependencies]
12+
abi-vector-layout-cpu = { path = "../../vector_layout/cpu", features = ["cuda"] }
13+
14+
# CPU deps (for the test harness)
15+
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
16+
difftest.workspace = true
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#![cfg_attr(target_arch = "spirv", no_std)]
2+
3+
pub use abi_vector_layout_cpu::shader::main_cs;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use abi_vector_layout_cpu::glam_features::GlamFeatures;
2+
3+
fn main() {
4+
abi_vector_layout_cpu::shader_driver::run(GlamFeatures::Cuda);
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "abi-vector-layout-cuda-cpu"
3+
edition.workspace = true
4+
5+
[lints]
6+
workspace = true
7+
8+
# GPU deps
9+
[dependencies]
10+
abi-vector-layout-cpu = { path = "../../vector_layout/cpu", features = ["scalar-math"] }
11+
12+
# CPU deps (for the test harness)
13+
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
14+
difftest.workspace = true
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
use abi_vector_layout_cpu::glam_features::GlamFeatures;
2+
3+
fn main() {
4+
abi_vector_layout_cpu::cpu_driver::run(GlamFeatures::ScalarMath);
5+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[package]
2+
name = "abi-vector-layout-cuda-rust-gpu"
3+
edition.workspace = true
4+
5+
[lib]
6+
crate-type = ["lib", "dylib"]
7+
8+
[lints]
9+
workspace = true
10+
11+
[dependencies]
12+
abi-vector-layout-cpu = { path = "../../vector_layout/cpu", features = ["scalar-math"] }
13+
14+
# CPU deps (for the test harness)
15+
[target.'cfg(not(target_arch = "spirv"))'.dependencies]
16+
difftest.workspace = true

0 commit comments

Comments
 (0)