Class DecodeForwardProfile.Snapshot

java.lang.Object
smile.llm.engine.DecodeForwardProfile.Snapshot
Enclosing class:
DecodeForwardProfile

public static final class DecodeForwardProfile.Snapshot extends Object
Per-thread / per-rank nanosecond accumulators.
  • Field Details

    • embedNs

      public long embedNs
      Embedding phase nanoseconds.
    • fullAttnNs

      public long fullAttnNs
      Full-attention mixer nanoseconds.
    • linearAttnNs

      public long linearAttnNs
      Linear-attention / DeltaNet mixer nanoseconds.
    • mlpNs

      public long mlpNs
      MLP nanoseconds.
    • ncclNs

      public long ncclNs
      NCCL / TP all-reduce nanoseconds.
    • lmHeadNs

      public long lmHeadNs
      Final norm + lm_head nanoseconds.
    • deltaProjNs

      public long deltaProjNs
      DeltaNet sub-phases (sum ≈ linearAttnNs when profiled).
    • deltaConvNs

      public long deltaConvNs
      DeltaNet causal conv nanoseconds.
    • deltaGateNs

      public long deltaGateNs
      DeltaNet gate nanoseconds.
    • deltaRecurrentNs

      public long deltaRecurrentNs
      DeltaNet recurrent nanoseconds.
    • deltaOutNs

      public long deltaOutNs
      DeltaNet output projection nanoseconds.
  • Constructor Details

    • Snapshot

      public Snapshot()
      Creates an empty timing/snapshot holder.
  • Method Details

    • maxWith

      public void maxWith(DecodeForwardProfile.Snapshot other)
      Element-wise max into this.
      Parameters:
      other - other snapshot to merge (ignored if null).
    • embedMs

      public long embedMs()
      Elapsed embedding time in milliseconds.
      Returns:
      embedNs converted to ms.
    • fullAttnMs

      public long fullAttnMs()
      Elapsed full-attention time in milliseconds.
      Returns:
      fullAttnNs converted to ms.
    • linearAttnMs

      public long linearAttnMs()
      Elapsed linear-attention time in milliseconds.
      Returns:
      linearAttnNs converted to ms.
    • mlpMs

      public long mlpMs()
      Elapsed MLP time in milliseconds.
      Returns:
      mlpNs converted to ms.
    • ncclMs

      public long ncclMs()
      Elapsed NCCL / collective time in milliseconds.
      Returns:
      ncclNs converted to ms.
    • lmHeadMs

      public long lmHeadMs()
      Elapsed LM-head time in milliseconds.
      Returns:
      lmHeadNs converted to ms.
    • deltaProjMs

      public long deltaProjMs()
      Elapsed DeltaNet projection time in milliseconds.
      Returns:
      deltaProjNs converted to ms.
    • deltaConvMs

      public long deltaConvMs()
      Elapsed DeltaNet convolution time in milliseconds.
      Returns:
      deltaConvNs converted to ms.
    • deltaGateMs

      public long deltaGateMs()
      Elapsed DeltaNet gate time in milliseconds.
      Returns:
      deltaGateNs converted to ms.
    • deltaRecurrentMs

      public long deltaRecurrentMs()
      Elapsed DeltaNet recurrent time in milliseconds.
      Returns:
      deltaRecurrentNs converted to ms.
    • deltaOutMs

      public long deltaOutMs()
      Elapsed DeltaNet output-projection time in milliseconds.
      Returns:
      deltaOutNs converted to ms.