Package io.github.kirstenali.deepj.tensor


package io.github.kirstenali.deepj.tensor
  • Class
    Description
     
    Internal lifetime tracking for non-escaping buffers produced by library backward rules.
    Optional backend capability for memory-efficient, fused causal attention.
    Output, row statistics and unrounded FP32 output needed by tiled backward.
     
    Logical-layout Adam arithmetic matches the original contiguous FLOAT32 update order.
    Assigns logical values with explicit dtype conversion, including overlapping source/destination views.
    Stable final-axis loss and FLOAT32 gradient, including strided/compact logits and response masks.
    CPU logical-layout kernels with real compact storage and FLOAT32 arithmetic.
     
     
    Logical ND index selection and deterministic repeated-index accumulation.
    General strided/broadcast CPU matmul; the existing FLOAT32 matrix fast path remains separate.
    Last-axis CPU normalization, with FLOAT32 statistics and no intermediate compact rounding.
    Typed position operations accumulate in FLOAT32 and round only the final stored activation.
    Axis reductions accumulate in FLOAT32 and round compact output only once per result value.
    Stable logical-axis softmax without an intermediate compact-dtype exponential tensor.
    Two-pass FLOAT32 statistics without a full-sized FLOAT32 shadow of compact input.
    Equal-shaped SwiGLU operands decode to FLOAT32 and only round the completed output.
    Checked CPU row kernels; the Tensor facade owns autograd mutation fences as for other backends.
    Class scores occupy the final axis; every leading position has one integer target.
    Unfused backend composition preserves the original matrix loss/gradient evaluation order.
     
    Dense floating-point storage formats.
    Validates physical allocations without flattening logical tensor dimensions.
     
     
    Opt-in opcode counter for the executed GPU command stream (-Ddeepj.graph.histogram=true).
    Inference-only storage operations for head-major key/value caches.
    Batch and head axes are distinct; packed matrices are temporary native-kernel views only.
    Common validation for the existing rank-two CPU and native attention kernels.
    Final-axis normalization accepts vector gains and the historical 1-by-width parameter layout.
    The output uses promoted storage; normalized values and denominators retain FLOAT32 accumulation.
    Adam updates accumulate in independent FLOAT32 parameter/master and moment buffers.
    Explicit compatibility for packed matrix APIs,delegating their work to the same ND operators.
    Logical dimensions for the compatibility API; never inferred from a GPU allocation's physical rows.
     
    Model activations use[batch,time,width]; historical single-sequence matrices remain explicit.
     
     
     
     
    Validated logical checkpoint metadata; reading it never allocates tensor values.
    Raw-bit, logical-order tensor payloads; no FLOAT32 shadow is needed for compact storage.
    Shape transformations retain one Tensor system and participate in first-order autograd.
    Bounds internal view lifetimes, without releasing saved or explicitly retained storage.
    Shared physical storage plumbing; logical Tensor operations remain on the concrete facade.