whn09 9c8c85d83d Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25)
- Decode runs eagerly and compiles per-layer regions (attention half, MoE) with stage boundaries
  (neuron_ops/regions.py, DEEPINFER_NEURON_GRAPH_MODE=regions); layer KV views are sliced from the
  roots inside the graph (_LazyKVCache).
- vllm-neuron#71 NKI kernels (Apache-2.0, vendored under neuron_ops/nki/ with attribution), called via
  torch_neuronx.nki_hop.wrap_nki: blockquant (fp8/fp4 GEMMs incl. grouped einsum, MoE and shared
  expert on bf16 activations), sparse_attn / index_score / compress_pool (nki_attention.py),
  hc_mixes / hc_expand / hc_collapse / hc_attn_out / rmsnorm / swiglu (nki_hc.py, nki_norm.py).
- Compile-safe formulations: row-major scales, no dtype bitcasts of graph inputs (uint8 weight
  tensors), whole-row KV stores, byte assembly in int32 narrowed once at the store, arithmetic int16
  scale packing, plain fma/rsqrt and bf16 F.linear under compile; default backend deepinfer_neuron
  (torch fp8 carried as uint8, avoiding NCC_EOCP001 with the kernels' OCP fp8).
- Host: tiny model 9/9 vs golden on all prompts; device: kernel tests pass (13 attention, 88 hc/norm);
  region decode graph compiles except the attention projection stage (being reduced).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 17:36:54 +08:00
..
asc initial commit 2026-10-20 12:09:42 +08:00
cuda initial commit 2026-10-20 12:09:42 +08:00
neuron Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25) 2026-10-22 17:36:54 +08:00
__init__.py initial commit 2026-10-20 12:09:42 +08:00
cache_common.py initial commit 2026-10-20 12:09:42 +08:00
candidate_blocks.py initial commit 2026-10-20 12:09:42 +08:00
common.py initial commit 2026-10-20 12:09:42 +08:00
compress.py initial commit 2026-10-20 12:09:42 +08:00
compute_seqlens_k_zos.py initial commit 2026-10-20 12:09:42 +08:00
conftest.py initial commit 2026-10-20 12:09:42 +08:00
dflash_copy.py initial commit 2026-10-20 12:09:42 +08:00
dflash.py initial commit 2026-10-20 12:09:42 +08:00
flash_mla_utils.py initial commit 2026-10-20 12:09:42 +08:00
fused_sample.py initial commit 2026-10-20 12:09:42 +08:00
fused_transform.py initial commit 2026-10-20 12:09:42 +08:00
gather_engram_tokens_zos.py initial commit 2026-10-20 12:09:42 +08:00
gather_input_ids_zos.py initial commit 2026-10-20 12:09:42 +08:00
gather.py Neuron: static decode graphs, static-shape MoE, trn2 e4m3 fp8 (issues #9, #12, #24) 2026-10-22 11:59:37 +08:00
get_kv_index.py initial commit 2026-10-20 12:09:42 +08:00
image_embed_ops.py initial commit 2026-10-20 12:09:42 +08:00
kv_index_cat.py initial commit 2026-10-20 12:09:42 +08:00
load_paged_kv_cache.py initial commit 2026-10-20 12:09:42 +08:00
norm.py Neuron: per-layer region graphs + vllm-neuron#71 NKI kernels (issues #10, #11, #13, #25) 2026-10-22 17:36:54 +08:00
ops.py initial commit 2026-10-20 12:09:42 +08:00
outlier_detection.py initial commit 2026-10-20 12:09:42 +08:00
prepare_cp_mirror.py initial commit 2026-10-20 12:09:42 +08:00
prepare_v4_decode_metadata.py initial commit 2026-10-20 12:09:42 +08:00
random_sampling.py initial commit 2026-10-20 12:09:42 +08:00
sampler.py initial commit 2026-10-20 12:09:42 +08:00
schedule_mtp_varlen.py initial commit 2026-10-20 12:09:42 +08:00
state_cache.py initial commit 2026-10-20 12:09:42 +08:00
store_kv_cache.py initial commit 2026-10-20 12:09:42 +08:00
store_mtp_info.py initial commit 2026-10-20 12:09:42 +08:00
structure_output.py initial commit 2026-10-20 12:09:42 +08:00
sum_smaller_probs.py initial commit 2026-10-20 12:09:42 +08:00
swa_index.py initial commit 2026-10-20 12:09:42 +08:00