SizeThreshold

data class SizeThreshold(val bytes: Long, val scope: String = "model") : ConstantMaterializationPolicy(source)

Hybrid policy: small constants stay inline, large ones go external. The threshold is measured in logical byteselementCount * bytesPerElement computed from the output sk.ainet.lang.tensor.ops.TensorSpec — not the MLIR text size. This keeps the decision independent of downstream splat / dense formatting.

Constructors

Link copied to clipboard
constructor(bytes: Long, scope: String = "model")

Properties

Link copied to clipboard
val bytes: Long

Minimum logical size (inclusive) at which a constant is externalized.

Link copied to clipboard

Namespace for externalized constants (see ExternalAlways.scope).