Add STDE deferred items: const-generic diagonal, dense STDE, GPU Taylor#27
Merged
gvonness-apolitical merged 1 commit intomainfrom Feb 25, 2026
Merged
Conversation
300a3a9 to
a758cd4
Compare
Implements the deferred items from the STDE plan: - Const-generic diagonal_kth_order_const<ORDER> for stack-allocated fast path when derivative order is known at compile time - Dense STDE for positive-definite 2nd-order operators (dense_stde_2nd) using Cholesky-transformed Gaussian directions - GPU-accelerated 2nd-order Taylor forward propagation via new WGSL shader and CUDA kernel, propagating (c0, c1, c2) triples through the tape for batched STDE evaluation - High-level GPU STDE wrappers: laplacian_gpu, hessian_diagonal_gpu, laplacian_with_control_gpu - Comprehensive tests (const-generic, dense STDE, per-opcode GPU, end-to-end GPU STDE) and benchmarks - Documentation updates across algorithms.md, README, and module docs
a758cd4 to
54f98d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
diagonal_kth_order_const<ORDER>— stack-allocated const-generic variant ofdiagonal_kth_orderfor compile-time-known derivative order, avoiding TaylorDyn arena overheaddense_stde_2nd— dense STDE for positive-definite 2nd-order operators using Cholesky-transformed Gaussian directions (tr(C · H)estimation)taylor_forward_2nd.wgsl) and CUDA kernel (taylor_eval.cu), propagating(c0, c1, c2)triples through the tapetaylor_forward_2nd_batchinto bothWgpuContextandCudaContextlaplacian_gpu,hessian_diagonal_gpu,laplacian_with_control_gpualgorithms.md,README.md, and module docsTest plan
cargo test --features "stde,diffop,gpu-wgpu"— 640 tests pass, 0 failurescargo build --features "stde,diffop,gpu-wgpu"— clean buildtaylor_jet_2ndfor all opcode categorieslaplacian_gpumatches CPUlaplacian(tolerance ~1e-4)hessian_diagonal_gpumatches CPUhessian_diagonal(tolerance ~1e-4)