You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
npu: the layer_types refusal is a substring test, so a linear-attention variant it cannot run is accepted as GDN #1156
so the guarantee "refuse a layer kind this forward does not implement" is exactly as wide as the substring. A probe linking that same q4nx_semantics.c and parsing a two-entry layer_types (full_attention, <spelling>):
Nothing in circulation hits this: every container on the box declares full_attention / linear_attention / sliding_attention, and linear_attention is the HF spelling the GDN path is for, so the family test is right today. The cost of being wrong later is the failure mode #1124 exists to remove: a spelling that contains "linear" but names an attention math the forward does not have would be served through the GDN recurrence, fluently and silently, instead of refused by name.
Suggested fix, one line plus one case: exact match against the known set (full_attention, linear_attention, sliding_attention, and any other spelling a real container uses) and let everything else fall to Q4NX_LAYER_OTHER, which the guard already refuses by name. tests/q4nx_layer_kinds_test.c case 2 would then also be the place to add chunked_linear_attention as a refused spelling.
Found while reviewing engine #1124 (the guard is a strict improvement over main, so that PR was not held for this).
Activity
npu: layer_types is matched exactly, so a kind the forward cannot run…