Migrates symclaw-gpu from cubecl 0.9 to 0.10 (0.9's cuda backend was upstream- broken) and fixes the long-standing cpu/cuda-backend failures so all three backends are green. cubecl 0.10 API migration (eval/ntt/linalg/groebner/poly_gcd/monte_carlo): - ArrayArg::from_raw_parts(handle, len) — handle by value, no generic/vectorize. - read_one -> read_one_unchecked (returns Bytes, matching 0.9 behavior). - scalar launch args passed as plain values (ScalarArg::new removed). - launch returns () now: drop .is_ok()/.expect()/`let _ =` on launch results. Correctness fix (the real bug behind the SIGSEGV + 3 failing NTT tests): - NTT kernels (butterfly, pointwise_mul, scale) lacked bounds guards. The launch rounds thread count up to the cube dim, so most threads were padding doing OUT-OF-BOUNDS reads/writes. wgpu/Vulkan tolerated it; the cuda/cpp backends corrupted the buffer (garbage NTT results) or SIGSEGV'd. Added `if tid < len` guards. Also inlined gpu_mod_mul's <<16 reductions (no nested cube-fn calls). Validated on `tank` (RTX 5060 Ti): wgpu 101/0, CUDA 101/0, cpu 118/0 — clippy clean on all three. The GPU Monte-Carlo interpreter matches analytic integrals on both CUDA and wgpu. The prior cpu SIGSEGV and 3 NTT failures are resolved. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
29 lines
740 B
TOML
29 lines
740 B
TOML
[package]
|
|
name = "symclaw-gpu"
|
|
description = "GPU-accelerated numeric computation for SymClaw via CubeCL"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
authors.workspace = true
|
|
|
|
[features]
|
|
default = ["wgpu"]
|
|
cuda = ["cubecl/cuda"]
|
|
wgpu = ["cubecl/wgpu"]
|
|
cpu = ["cubecl/cpu"]
|
|
|
|
[dependencies]
|
|
cubecl = { version = "0.10", default-features = false }
|
|
symclaw-core = { path = "../symclaw-core" }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
num-traits = { workspace = true }
|
|
num-rational = { workspace = true }
|
|
ordered-float = { workspace = true }
|
|
rand = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
symclaw-core = { path = "../symclaw-core" }
|