Class DecodeForwardProfile.Snapshot
java.lang.Object
smile.llm.engine.DecodeForwardProfile.Snapshot
- Enclosing class:
DecodeForwardProfile
Per-thread / per-rank nanosecond accumulators.
-
Field Summary
FieldsModifier and TypeFieldDescriptionlongDeltaNet causal conv nanoseconds.longDeltaNet gate nanoseconds.longDeltaNet output projection nanoseconds.longDeltaNet sub-phases (sum ≈linearAttnNswhen profiled).longDeltaNet recurrent nanoseconds.longEmbedding phase nanoseconds.longFull-attention mixer nanoseconds.longLinear-attention / DeltaNet mixer nanoseconds.longFinal norm + lm_head nanoseconds.longMLP nanoseconds.longNCCL / TP all-reduce nanoseconds. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongElapsed DeltaNet convolution time in milliseconds.longElapsed DeltaNet gate time in milliseconds.longElapsed DeltaNet output-projection time in milliseconds.longElapsed DeltaNet projection time in milliseconds.longElapsed DeltaNet recurrent time in milliseconds.longembedMs()Elapsed embedding time in milliseconds.longElapsed full-attention time in milliseconds.longElapsed linear-attention time in milliseconds.longlmHeadMs()Elapsed LM-head time in milliseconds.voidElement-wise max intothis.longmlpMs()Elapsed MLP time in milliseconds.longncclMs()Elapsed NCCL / collective time in milliseconds.
-
Field Details
-
embedNs
public long embedNsEmbedding phase nanoseconds. -
fullAttnNs
public long fullAttnNsFull-attention mixer nanoseconds. -
linearAttnNs
public long linearAttnNsLinear-attention / DeltaNet mixer nanoseconds. -
mlpNs
public long mlpNsMLP nanoseconds. -
ncclNs
public long ncclNsNCCL / TP all-reduce nanoseconds. -
lmHeadNs
public long lmHeadNsFinal norm + lm_head nanoseconds. -
deltaProjNs
public long deltaProjNsDeltaNet sub-phases (sum ≈linearAttnNswhen profiled). -
deltaConvNs
public long deltaConvNsDeltaNet causal conv nanoseconds. -
deltaGateNs
public long deltaGateNsDeltaNet gate nanoseconds. -
deltaRecurrentNs
public long deltaRecurrentNsDeltaNet recurrent nanoseconds. -
deltaOutNs
public long deltaOutNsDeltaNet output projection nanoseconds.
-
-
Constructor Details
-
Snapshot
public Snapshot()Creates an empty timing/snapshot holder.
-
-
Method Details
-
maxWith
Element-wise max intothis.- Parameters:
other- other snapshot to merge (ignored ifnull).
-
embedMs
-
fullAttnMs
public long fullAttnMs()Elapsed full-attention time in milliseconds.- Returns:
fullAttnNsconverted to ms.
-
linearAttnMs
public long linearAttnMs()Elapsed linear-attention time in milliseconds.- Returns:
linearAttnNsconverted to ms.
-
mlpMs
-
ncclMs
public long ncclMs()Elapsed NCCL / collective time in milliseconds.- Returns:
ncclNsconverted to ms.
-
lmHeadMs
-
deltaProjMs
public long deltaProjMs()Elapsed DeltaNet projection time in milliseconds.- Returns:
deltaProjNsconverted to ms.
-
deltaConvMs
public long deltaConvMs()Elapsed DeltaNet convolution time in milliseconds.- Returns:
deltaConvNsconverted to ms.
-
deltaGateMs
public long deltaGateMs()Elapsed DeltaNet gate time in milliseconds.- Returns:
deltaGateNsconverted to ms.
-
deltaRecurrentMs
public long deltaRecurrentMs()Elapsed DeltaNet recurrent time in milliseconds.- Returns:
deltaRecurrentNsconverted to ms.
-
deltaOutMs
public long deltaOutMs()Elapsed DeltaNet output-projection time in milliseconds.- Returns:
deltaOutNsconverted to ms.
-