Commit Graph
2 Commits
Author SHA1 Message Date
osobhandClaude Opus 4.8 2c43fc3399 fix(symclaw-gpu): cubecl 0.10 migration + CUDA backend + bounds-guard fixes
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]>
2026-06-24 10:56:10 -07:00
redclawsystems f4b75db2ee Merge pull request 'test(symclaw-skill): cover handlers_advanced via JSON API' (#10) from ci-doctor/coverage-20260518-201834 into master
Reviewed-on: #10
2026-05-19 04:39:49 +00:00