Skip to main content

FkcError

Enum FkcError 

Source
#[non_exhaustive]
pub enum FkcError {
Show 48 variants TabIndentation { line: usize, }, AnchorDisallowed { line: usize, }, AliasDisallowed { line: usize, }, MergeKeyDisallowed { line: usize, }, NorwayToken { token: String, line: usize, }, MalformedFrontMatter(String), MissingFkcBlock { section: String, }, MultipleFkcBlocks { section: String, count: usize, }, OrphanFkcBlock { line: usize, }, Yaml(String), MissingRequiredField { section: String, field: String, }, BlurbMismatch { section: String, structured: String, prose: String, }, OpTargetAmbiguous { section: String, op_kind: Option<String>, fused_op: Option<String>, }, UnknownOpKind { section: String, op_kind: String, }, UnknownFusedOp { section: String, fused_op: String, }, BadScalarType { section: String, operand: String, token: String, }, ReservedScalarType { section: String, operand: String, token: String, }, FanoutDtypeMismatch { section: String, operand: String, expected: String, found: String, }, OptionalOperandNotLast { section: String, operand: String, }, PassthroughNamesOptionalOperand { section: String, role: String, }, UnknownBackend { section: String, backend: String, }, UnknownEntryPoint { section: String, entry_point: String, }, UnknownCostFn { section: String, cost_fn: String, }, BadLayoutFlag { section: String, operand: String, flag: String, value: String, }, CostExprParse { section: String, field: String, expr: String, reason: String, }, PlaceholderPrecision { section: String, }, DuplicateKernelRef(String), ProviderMismatch { field: String, expected: String, found: String, file: String, }, Io { path: String, reason: String, }, UnsupportedVersion { found: u32, supported: &'static [u32], }, LayoutIncoherent { section: String, operand: String, reason: String, }, AwkwardStrategyIncoherent { section: String, operand: String, strategy: String, reason: String, }, QuantIncoherent { section: String, operand: String, reason: String, }, ScaleDoubleDeclared { section: String, operand: String, reason: String, }, MxNotYetRegistrable { section: String, family: String, reason: String, }, BadOpParamsVariant { section: String, variant: String, namespace: String, }, CostProvenanceMissing { section: String, found: Option<String>, }, PlaceholderCost { section: String, reason: String, }, UnauditedPrecision { section: String, }, BundleSlotRankExceeded { section: String, slot: String, rank: usize, }, ShapeRuleMismatch { section: String, role: String, expected: String, actual: String, }, BundleArityMismatch { section: String, expected: usize, actual: usize, }, UnparseableShapeConstraint { section: String, operand: String, raw: String, }, GatherIncoherent { section: String, operand: String, reason: String, }, GatherNotYetSupported { section: String, operand: String, }, FdxTokenNotInTable { section: String, field: String, token: String, }, UnknownAdmissibilityEnum { section: String, field: String, value: String, }, MissingBlurb { section: String, },
}
Expand description

A typed FKC import failure (Result-returning, never a panic).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

TabIndentation

Tab indentation inside a YAML chunk (front-matter or an fkc block). YAML forbids tab indentation; §3.8 makes this a hard error with a line rather than a confusing downstream parse error.

Fields

§line: usize
§

AnchorDisallowed

A YAML anchor (&name) was used. §3.8 disables anchors so a diff reviewer sees every value literally and the importer never resolves a reference graph.

Fields

§line: usize
§

AliasDisallowed

A YAML alias (*name) was used. Disallowed for the same reason as anchors (§3.8).

Fields

§line: usize
§

MergeKeyDisallowed

A YAML merge key (<<:) was used. Disallowed (§3.8).

Fields

§line: usize
§

NorwayToken

An unquoted Norway-problem token (no/yes/on/off/n/y) appeared in a scalar value position. §3.8 disarms the Norway problem by requiring such tokens to be quoted so they cannot silently coerce to a bool.

Fields

§token: String
§line: usize
§

MalformedFrontMatter(String)

The file-level ----fenced YAML front-matter is missing or malformed.

§

MissingFkcBlock

A ## kernel section has no fenced ```fkc block (§3.1 requires exactly one).

Fields

§section: String
§

MultipleFkcBlocks

A ## kernel section has more than one fenced ```fkc block (§3.1 requires exactly one).

Fields

§section: String
§count: usize
§

OrphanFkcBlock

A ```fkc fenced block appears outside any ## section (before the first heading, or in a file with no ## headings). Such a block is silently dropped by section scanning, so the import would succeed while adopting nothing — a no-op that looks like success (§3.1).

Fields

§line: usize
§

Yaml(String)

serde_yaml_ng failed to deserialize a YAML chunk into the schema. The string carries the underlying error (and the section name when known).

§

MissingRequiredField

A required schema field is absent (V-FKC-1, §10). field names the missing key; section the kernel section it belongs to.

Fields

§section: String
§field: String
§

BlurbMismatch

The structured blurb: does not equal the prose blurb (V-FKC-2, §10.11). Reserved here; the prose-vs-structured comparison is wired in a later step.

Fields

§section: String
§structured: String
§prose: String
§

OpTargetAmbiguous

Neither op_kind nor fused_op is present, or both are present. Exactly one must be declared (a primitive vs fused contract; §3.7, V-FKC-5). The structural check happens at lower time.

Fields

§section: String
§op_kind: Option<String>
§fused_op: Option<String>
§

UnknownOpKind

An op_kind string did not match any as-built OpKind variant (§2.1; the lower-time match is exhaustive over OpKind).

Fields

§section: String
§op_kind: String
§

UnknownFusedOp

A fused_op string did not match any registered FusedOpId name (the name table is built from fuel-graph’s default_registry(); §2.2).

Fields

§section: String
§fused_op: String
§

BadScalarType

A dtype token (or a dtype_class shorthand expansion) did not match any as-built DType/shorthand (§3.4). The explicit match makes a bad token a typed error rather than a silent skip.

Fields

§section: String
§operand: String
§token: String
§

ReservedScalarType

A dtype token that KISS-CLASSIFY §6.1 RESERVES at this schema version. It is a real, specified layout (the AMD fnuz FP8 forms) that Fuel recognizes and deliberately does not compute on.

§Why this is not FkcError::BadScalarType

A reserved token and an unknown one imply different actions: reserved means wait for a schema bump, unknown means fix your contract. Reporting a correctly-spelled F8E5M2FNUZ as a “bad dtype token” sends a contract author hunting for a typo that isn’t there. FKC files are external, hand-authored input, so this is a real ingest surface — which is what makes the distinction worth a variant here.

§What this is NOT

It is not KISS-CLASSIFY §6.1-0001 conformance. That clause binds a reader of a structure_key, and Fuel has none — it derives and emits keys and treats foreign ones as opaque bytes (K1 opacity). This is the reserved vocabulary of §6.1 applied to a surface Fuel actually ingests.

§This decline EXPIRES, on an external trigger (GAP-161)

A decline for want of a kernel becomes wrong the moment the kernel lands. This one becomes wrong when KISS activates the tokens — sk4 §6.1-0001 calls that “a future additive schema event”. So it expires too; what differs is that its trigger is external and announced, and cannot quietly become true through a Fuel-side change. See fuel_ir::RESERVED_DTYPE_TOKENS, the single grep target to flip.

Fields

§section: String
§operand: String
§token: String
§

FanoutDtypeMismatch

Two operands that both vary (enumerate >1 dtype) in one section disagree on their fan-out dtype list (§3.4 multi-dtype fan-out). ALL varying operands must enumerate the SAME dtype list in the SAME order so the importer can fan the section into one per-dtype binding without silently picking one operand’s list over another’s.

Fields

§section: String
§operand: String
§expected: String
§found: String
§

OptionalOperandNotLast

An optional: true operand is NOT the LAST input (§3.4 optional-operand fan-out). Only the last input may be optional — omitting the last input yields a CONTIGUOUS valid key ending just before the outputs, whereas an earlier optional operand would leave a hole in the middle of the key and mis-align every following operand. This is a typed error, never a silent mis-key.

Fields

§section: String
§operand: String
§

PassthroughNamesOptionalOperand

A passthrough(role) output names the OPTIONAL operand as its dtype source (§3.4 / §5.1). When the optional operand is absent the passthrough cannot resolve, so its two keys (with / without the operand) would carry DIFFERENT output dtypes — an output may not derive its dtype from an operand that can be omitted. A typed error, never a silent mis-key.

Fields

§section: String
§role: String
§

UnknownBackend

A backend string did not match any as-built BackendId (§2.1).

Fields

§section: String
§backend: String
§

UnknownEntryPoint

The entry_point symbol was absent from the provider link registry (§12.6; P9 — the importer never fabricates a pointer).

Fields

§section: String
§entry_point: String
§

UnknownCostFn

A cost.cost_fn NAME was absent from the provider link registry’s cost-fn table (§4.4 cost-fn trampoline; the cost-model analogue of Self::UnknownEntryPoint). The importer never fabricates a cost-fn pointer nor silently falls back to unknown_cost — a named-but-unknown cost fn is a typed error.

Fields

§section: String
§cost_fn: String
§

BadLayoutFlag

A layout tri-state flag carried a value outside the legal set (required / accepted / rejected / n/a); §4.1, §6.

Fields

§section: String
§operand: String
§flag: String
§value: String
§

CostExprParse

A cost expression failed to parse against the §2.3 grammar (V-FKC-8, §4.4). Carries the offending field + the raw expression.

Fields

§section: String
§field: String
§expr: String
§reason: String
§

PlaceholderPrecision

A precision block is a bare placeholder (no audited, no bounds, no notes) — there is nothing to lower (§4.8, PlaceholderPrecision).

Fields

§section: String
§

DuplicateKernelRef(String)

A registration drove the same KernelRef function pointer onto one (op, dtypes, backend) decision point twice (§3 / V-FKC-3). The importer never panics on this; it surfaces the crate::kernel::KernelBindingTable::finalize gate as a typed error after all inserts. The string carries the dispatch-layer message (which names the offending (op, dtypes, backend) key).

§

ProviderMismatch

import_glob collected files whose front-matter disagrees: the provider.name / provider.backend / provider.kernel_source must match across every file merged into one provider (§9.2).

Fields

§field: String
§expected: String
§found: String
§file: String
§

Io

A glob / file-read I/O failure (no readable file, an unreadable path, a bad glob pattern). Carries the offending path/pattern + the underlying error text.

Fields

§path: String
§reason: String
§

UnsupportedVersion

fkc_version is not in the importer’s declared supported set (V-FKC §10.1; KISS #450 — membership, not a <= max bound, so 0 is rejected).

Fields

§found: u32
§supported: &'static [u32]
§

LayoutIncoherent

Layout flags are mutually incoherent (V-FKC §10.4): neither contiguous nor strided is acceptable; or broadcast_stride0 / reverse_strides accepted without strided: accepted.

Fields

§section: String
§operand: String
§reason: String
§

AwkwardStrategyIncoherent

A per-operand (or kernel-wide) awkward_layout_strategy contradicts the operand’s own layout flags, or carries an unknown value (V-FKC §10.5; an unknown value is meaning-bearing per §11.1).

Fields

§section: String
§operand: String
§strategy: String
§reason: String
§

QuantIncoherent

A quant block is internally incoherent (V-FKC §10.6): a GGML_BLOCK with a ScalePair/granularity, an MX without granularity: PerBlock, an AFFINE_* with a bad granularity, an AFFINE_BLOCK missing its block geometry, a ggml_dtype that is not a real GgmlDType variant, a sub-byte operand with no fdx.quant, etc.

Fields

§section: String
§operand: String
§reason: String
§

ScaleDoubleDeclared

A scale was declared in two places at once (V-FKC §10.6): both an fdx.quant.scale_operand (separate-input scale) and a sidecar-bundled scale for the same scale. Each scale lives in exactly one place.

Fields

§section: String
§operand: String
§reason: String
§

MxNotYetRegistrable

A contract is describable but NOT yet registrable on today’s types (V-FKC §10.6): MX (no ScaleGranularity::PerBlock) or AFFINE_BLOCK (no block-quant descriptor target). The contract parse-validates; this gates it at registration time (§6).

Fields

§section: String
§family: String
§reason: String
§

BadOpParamsVariant

An op-param variant is not a real variant in the correct namespace (V-FKC §10.7): OpParams for an op_kind contract, FusedOpParams for a fused_op contract (§3.7).

Fields

§section: String
§variant: String
§namespace: String
§

CostProvenanceMissing

The required cost.provenance marker is absent or not one of {declared, judge_measured} (V-FKC §10.8a; the COST_RULE).

Fields

§section: String
§

PlaceholderCost

A cost block is a bare / placeholder / zero-sentinel cost under either provenance marker (V-FKC §10.8a) — not the honest class: free metadata-only case.

Fields

§section: String
§reason: String
§

UnauditedPrecision

An audited:false + all-null (UNAUDITED) precision on a non-reference contract (V-FKC §10.9). (Reserved; the lint treats UNAUDITED as a non-fatal note unless a stricter mode is requested.)

Fields

§section: String
§

BundleSlotRankExceeded

A bundle slot’s shape rule yields rank > 6 (V-FKC §10.13), which the serialized FDXOutputView ([u64; 6]) cannot represent.

Fields

§section: String
§slot: String
§rank: usize
§

ShapeRuleMismatch

A fused_op contract’s declared §5.1/§5.2 return rule disagrees with the real registered FusedOpEntry fn at a probe shape (V-FKC-7, Finding 5.1). expected/actual render either a shape or a dtype.

Fields

§section: String
§role: String
§expected: String
§actual: String
§

BundleArityMismatch

A return.bundle slot count disagrees with the registered output_views arity (V-FKC-7, Finding 5.2).

Fields

§section: String
§expected: usize
§actual: usize
§

UnparseableShapeConstraint

A shape_constraint: segment committed to §3.5 vocabulary but its argument is malformed (rank=banana, an unclosed divisible(, an empty dim[0]=). Non-vocabulary segments degrade to free text (a warning), not this error — this fires only on a real authoring mistake in the grammar.

Fields

§section: String
§operand: String
§

GatherIncoherent

A paged/gather operand is incoherent (V-FKC §10.14): kind: paged_blocks without requires_ext: true / symbolic_extent: required, or block_table/context_lens naming a non-existent accept.inputs role.

Fields

§section: String
§operand: String
§reason: String
§

GatherNotYetSupported

A gather-bearing operand reached registration before the FDX gather codes / Capability::DlpackExtGather landed (V-FKC §10.14; the MxNotYetRegistrable discipline for gather).

Fields

§section: String
§operand: String
§

FdxTokenNotInTable

A dtype / quant family / granularity / ggml_dtype token is not a member of FDX’s normative code table (V-FKC §10.16 drift-guard) — so FKC’s token set stays a subset of FDX’s.

Fields

§section: String
§field: String
§token: String
§

UnknownAdmissibilityEnum

An admissibility-affecting enum (extent_kind, gather.kind, quant family) carried an unknown value (V-FKC §10.5/§10.14/§10.15; meaning-bearing per §11.1 — a typed error, never a silent default).

Fields

§section: String
§field: String
§value: String
§

MissingBlurb

The structured blurb: does not match the prose blurb when the prose is available (V-FKC §10.11). Distinct from Self::BlurbMismatch (which is reserved for the prose-vs-structured comparison wired with the prose-bearing parse).

Fields

§section: String

Trait Implementations§

Source§

impl Debug for FkcError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FkcError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for FkcError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more