Expand description
GPU PTX kernels for Sequence Models & Structured Prediction.
Each kernel is emitted as a self-contained PTX module string, parameterised on the SM version. PTX ISA selection by SM: SM≥100 → 8.7 (Blackwell), SM≥90 → 8.4 (Hopper), SM≥80 → 8.0 (Ampere), else → 7.5 (Turing).
IMPORTANT: PTX kernel bodies use string concatenation (NOT format!())
for sections containing %rd, %r, %f register names, which Rust’s
format! macro would reject as malformed positional specifiers in
edition 2024.
Functions§
- beam_
topk_ ptx - Beam top-k partial-sort kernel (one-pass rank approximation).
- crf_
features_ ptx - CRF feature-score kernel.
- edit_
dist_ ptx - Edit-distance anti-diagonal cell update kernel.
- forward_
pass_ ptx - HMM forward-pass kernel (log-space).
- kalman_
predict_ ptx - Kalman predict step kernel (matrix-vector + covariance update).
- mrf_
gibbs_ ptx - Gibbs-sampling Ising MRF kernel: per-site conditional resample given neighbours.
- viterbi_
step_ ptx - Viterbi step kernel (log-space, with argmax storage).