mirror of
https://github.com/deepseek-ai/DeepInfer.git
synced 2026-10-28 23:07:09 +08:00
The op census of a decode step (DEEPINFER_NEURON_REGION_TIMING) found 85 eager aten ops in the forward outside the region graphs but 1905 in sampling (the top-p/top-k bisection and the int64 philox draw), ~0.6 s of NEFF launches. - The log-softmax / top-p / top-k part runs as one compiled graph: 1.4 ms instead of 46.7 ms on one core for the [1, 4096] force_topk row, logprobs within 1e-9. - Greedy rows (temperature clamped to SAMPLING_EPS) have one-hot weights, so the two-level draw returns their argmax; an all-greedy batch takes the argmax from the graph and skips the draw. The philox draw stays eager for sampled rows: neuronx-cc graphs reject 64-bit constants outside the int32 range (NCC_ESFH001), an int32 philox is #3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| asc | ||
| cuda | ||
| neuron | ||
| __init__.py | ||
| cache_common.py | ||
| candidate_blocks.py | ||
| common.py | ||
| compress.py | ||
| compute_seqlens_k_zos.py | ||
| conftest.py | ||
| dflash_copy.py | ||
| dflash.py | ||
| flash_mla_utils.py | ||
| fused_sample.py | ||
| fused_transform.py | ||
| gather_engram_tokens_zos.py | ||
| gather_input_ids_zos.py | ||
| gather.py | ||
| get_kv_index.py | ||
| image_embed_ops.py | ||
| kv_index_cat.py | ||
| load_paged_kv_cache.py | ||
| norm.py | ||
| ops.py | ||
| outlier_detection.py | ||
| prepare_cp_mirror.py | ||
| prepare_v4_decode_metadata.py | ||
| random_sampling.py | ||
| sampler.py | ||
| schedule_mtp_varlen.py | ||
| state_cache.py | ||
| store_kv_cache.py | ||
| store_mtp_info.py | ||
| structure_output.py | ||
| sum_smaller_probs.py | ||
| swa_index.py | ||