ExternalAlways

data class ExternalAlways(val scope: String = "model") : ConstantMaterializationPolicy(source)

Every candidate constant — currently tensor_constant, dense_constant, parameter, param, weight, bias — is lifted out of the IR. The converter emits a util.global module declaration and a util.global.load reference, and records an ExternalParameterRef on the resulting module. A downstream packager (e.g. the skainet-io-iree-params module planned in PR C) turns the refs into a .irpa sidecar that iree-compile --iree-opt-import-parameters=<path> resolves.

If a candidate node has no accompanying byte source (no values / initial_value list and no external handle), the converter falls back to inline with a diagnostic comment — better to emit working IR than to reference bytes that do not exist.

Constructors

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

Properties

Link copied to clipboard

Namespace written into the emitted util.global.load reference (@<scope>::@<key>) and into the ExternalParameterRef. "model" is the conventional default; callers may override per-module.