MCPcopy Create free account

hub / github.com/Avarok-Cybersecurity/atlas / functions

Functions7,049 in github.com/Avarok-Cybersecurity/atlas

↓ 1 callersMethodevict
(&self, _num_blocks: usize)
crates/spark-runtime/src/prefix_cache.rs:290
↓ 1 callersMethodevict_lru
Evict the least-recently-used session and return its freed snapshot slot IDs. Called when the SSM snapshot pool is exhausted and a new save is needed.
crates/spark-server/src/session_manager.rs:72
↓ 1 callersMethodexpand_and_enqueue_unexpanded
Handle an unexpanded initial state: enqueue the rule-body FSM start node. Returns true when `state` was unexpanded. Port of `ExpandAndEnqueueUnexpande
crates/xgrammar/src/earley/parser_api.rs:87
↓ 1 callersMethodexpand_image_pads
Post-process a rendered token sequence to expand `<|image_pad|>` placeholders. The Qwen3-VL / Qwen3.6 chat template emits exactly one `<|image_pad|>`
crates/spark-server/src/tokenizer/chat_impl.rs:303
↓ 1 callersMethodexpand_next_rule_ref_on_fsm
Expand `state` along its FSM node's outgoing edges, enqueuing epsilon successors and predicting referenced rules. Port of `ExpandNextRuleRefElementOnF
crates/xgrammar/src/earley/predict_fsm.rs:24
↓ 1 callersMethodexpr_id_of
`tag_dispatch` decoding needs the expr id; recover it by matching the data slice's start offset against the grammar's CSR layout.
crates/xgrammar/src/grammar/printer.rs:158
↓ 1 callersFunctionextractJs
(text)
bench/longcode/analyze.mjs:60
↓ 1 callersFunctionextract_assistant_incoming_message
( chat: &serde_json::Value, )
crates/spark-server/src/api/stored.rs:46
↓ 1 callersFunctionextract_expert_idx
Parse the expert index `E` out of a tensor key, handling the three common naming conventions (`block_sparse_moe.experts.{E}`, `mlp.experts.{E}`, `feed
crates/spark-model/src/preflight.rs:235
↓ 1 callersFunctionextract_json_string
Parse qwen3_coder XML: `<function=NAME><parameter=KEY>VALUE</parameter></function>` Extract a JSON string value by key from potentially truncated JSON
crates/spark-server/src/tool_parser/parse_single_a.rs:253
↓ 1 callersFunctionextract_ordered_vocab
Extract an ordered vocabulary from a HuggingFace tokenizer. Returns `vocab[i] = token_string_for_id_i`. Gaps are filled with empty strings.
crates/spark-server/src/grammar/mod.rs:27
↓ 1 callersFunctionextract_params_from_block
Extract parameter name-value pairs from a `<parameters>` block. Handles two layouts: - Direct: `<name>N</name>...<value>V</value>` (single param at t
crates/spark-server/src/tool_parser/parse_single_b.rs:213
↓ 1 callersFunctionextract_single_logprobs
Extract logprobs for a single token from the BF16 logits buffer on GPU. Copies `[1, vocab_size]` BF16 logits D2H, converts to FP32, and extracts top-
crates/spark-server/src/scheduler/logprobs.rs:88
↓ 1 callersFunctionextract_streaming_name
Extract function name from partial tool call buffer for incremental streaming. Handles Hermes JSON, Qwen3-Coder XML, Gemma-4, and Mistral native forma
crates/spark-server/src/tool_parser/streaming.rs:76
↓ 1 callersFunctionextract_tag_thinking
Split `text` into `(reasoning, content)` for a `<tag>`-delimited format. Mirrors the vLLM `BaseThinkingReasoningParser` / DeepSeek-R1 contract: A lea
crates/spark-server/src/reasoning_parser/parsers.rs:104
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_verify_fused_microtest.rs:55
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_chunk_delta_h_gateb.rs:23
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_split4_microtest.rs:19
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/rope_microtest.rs:17
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_cdh_vblock_microtest.rs:43
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_strided_norm_microtest.rs:29
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_chunk_shapetest.rs:80
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_recompute_wu_gateb.rs:23
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/gdn_wy_verify_microtest.rs:39
↓ 1 callersMethodf
(&mut self)
crates/spark-model/examples/w8a16_gemv_batch4_microtest.rs:24
↓ 1 callersFunctionf32_to_bf16
(f: f32)
crates/spark-model/examples/moe_topk_microtest.rs:22
↓ 1 callersFunctionf32_to_bf16_bits
f32 → BF16 bits, round-to-nearest-even — matches CUDA `__float2bfloat16`.
crates/spark-model/examples/w4a16_bf16_microtest.rs:63
↓ 1 callersFunctionf32_to_bf16_bits
f32 → BF16 bits, round-to-nearest-even — matches CUDA `__float2bfloat16`.
crates/spark-model/examples/w4a16_bf16_v2_microtest.rs:63
↓ 1 callersFunctionf32_to_bf16_bits
(f: f32)
crates/spark-model/examples/w4a16_gemv_sw_microtest.rs:43
↓ 1 callersFunctionf32_to_e2m1
Matches the device `float_to_e2m1` round-to-nearest-bin in the wrapper.
crates/spark-runtime/src/cutlass/tests/mod.rs:164
↓ 1 callersFunctionf32_to_e4m3
(v: f32)
crates/spark-model/examples/moe_silu_down_microtest.rs:50
↓ 1 callersFunctionf32_to_e4m3
Encode a small f32 to the nearest E4M3 byte (so test weights are realistic decoded magnitudes rather than arbitrary bytes including NaN/large).
crates/spark-model/examples/fp8gemm_microtest.rs:75
↓ 1 callersFunctionf32le
(v: &[f32])
crates/spark-model/examples/moe_silu_down_microtest.rs:73
↓ 1 callersFunctionf32le
(v: &[f32])
crates/spark-model/examples/moe_blend_microtest.rs:39
↓ 1 callersFunctionf32s_le
(v: &[f32])
crates/spark-model/examples/moe_microtest.rs:109
↓ 1 callersFunctionf32s_to_le
(v: &[f32])
crates/spark-model/examples/w8a16t_microtest.rs:111
↓ 1 callersFunctionf32s_to_le
(v: &[f32])
crates/spark-model/examples/w8a16_microtest.rs:117
↓ 1 callersFunctionfamilyDisplay
(fam)
site/scripts/gen-models.mjs:128
↓ 1 callersFunctionfenceBlock
(text)
bench/longcode/analyze.mjs:38
↓ 1 callersMethodfetch_logits_f32
Copy BF16 logits from GPU, expand to FP32, return FP32 slice.
crates/spark-runtime/src/sampler.rs:154
↓ 1 callersFunctionfetch_long_text
Fetch a long public-domain text for context window testing.
scripts/dev/test_long_context.py:28
↓ 1 callersFunctionfi_chunk_gated_delta_rule
( q: torch.Tensor, k: torch.Tensor, v: torch.Tensor, g: torch.Tensor, beta: torch.Tensor,
bench/fp8_dgx2_drift/vllm_src/gdn_linear_attn.py:86
↓ 1 callersMethodfile_offset
File offset for `key` within its layer's file.
crates/spark-storage/src/group.rs:86
↓ 1 callersFunctionfill_test_file
(path: &Path, bytes: u64)
crates/spark-storage/src/probe.rs:53
↓ 1 callersMethodfinalize
(&mut self)
crates/spark-server/src/scheduler/mtp_gate.rs:260
↓ 1 callersFunctionfinalize_ir
Drain the parse stack into a finished [`RegexIr`].
crates/xgrammar/src/fsm/builder/regex_parse.rs:70
↓ 1 callersMethodfinalize_nvfp4_mmq_load
Eagerly materialize the block_nvfp4 gate/up copies for the `ATLAS_FFN_NVFP4_MMQ` W4A4 prefill arm at LOAD time (before KV sizing), then free the now-d
crates/spark-model/src/layers/dense_ffn.rs:404
↓ 1 callersFunctionfinalize_ref
( state: &AttnState, num_seqs: usize, num_q_heads: usize, head_dim: usize, )
crates/spark-storage/src/attention_ref.rs:93
↓ 1 callersFunctionfinalize_response
( state: Arc<AppState>, req: ChatCompletionRequest, req_ctx: Option<axum::extract::Extension<crate
crates/spark-server/src/api/chat_blocking.rs:443
↓ 1 callersFunctionfinalize_responses_stream
Emit `response.completed` (and the optional preceding `response.refusal.done`), persist the response if `store_flag` is set, and append items to the l
crates/spark-server/src/api/responses_stream_finalize.rs:195
↓ 1 callersFunctionfind_alloc
Find the allocation containing `ptr` (supports offset pointers).
crates/spark-runtime/src/gpu/mock.rs:57
↓ 1 callersFunctionfind_args_start
Find where arguments start in the buffer, after the name header. Returns byte offset into buffer where argument content begins.
crates/spark-server/src/tool_parser/streaming.rs:134
↓ 1 callersMethodfind_completion_token_ids
The shortest grammar-legal close (as content token ids) that drives the grammar from its current state to one where a stop token is legal, or `None` i
crates/xgrammar/src/api/matcher.rs:139
↓ 1 callersFunctionfind_cuda_dir
()
crates/atlas-kernels/build_codegen.rs:308
↓ 1 callersFunctionfind_files_written
(target: pathlib.Path)
bench/fp8_dgx2_drift/harness/score_run.py:58
↓ 1 callersFunctionfind_frame_end
(buf: &[u8])
crates/spark-server/src/api/responses_translate.rs:42
↓ 1 callersFunctionfind_hipcc
()
crates/atlas-kernels/build_target.rs:327
↓ 1 callersMethodfind_jump_forward_string_lossy
(&mut self)
crates/xgrammar/src/matcher/fill.rs:328
↓ 1 callersFunctionfind_last_boundary_with_snapshot
SSM-snapshot-aware boundary search for hybrid models. Like [`find_last_boundary`], but a boundary token at index `i` is only eligible if the decode r
crates/spark-server/src/scheduler/rollback.rs:137
↓ 1 callersFunctionfind_nvcc
()
crates/spark-storage/build.rs:131
↓ 1 callersFunctionfind_nvcc
Locate nvcc from CUDA_HOME, CUDA_PATH, or standard install locations.
crates/atlas-core/src/compute.rs:205
↓ 1 callersFunctionfind_scale_dir
Locate the SCALE (scale-lang.com) install root for the AMD/`scale` vendor path. A SCALE root is the extracted `scale-<ver>-Linux` dir that contains `b
crates/atlas-kernels/build_codegen.rs:242
↓ 1 callersFunctionfind_snapshot_with_weights
Pick the most-recently-modified snapshot under `snapshots/` that actually contains weights. Returns `None` if none of the siblings have weights.
crates/spark-server/src/model_resolver.rs:152
↓ 1 callersMethodfind_terminal
Find a terminal (no outgoing refs) or self-recursive FSM that can be hashed now. `-1` if none.
crates/xgrammar/src/grammar/functor/fsm_hasher.rs:95
↓ 1 callersFunctionfind_text_model
Locate the nn.Module whose `.layers` is the 40-layer decoder ModuleList. Walk through the wrapper (Qwen3_5MoeForConditionalGeneration -> .lang
bench/fp8_dgx2_drift/vllm_layer_dump.py:65
↓ 1 callersFunctionfind_unescaped_tool_call_close
Returns the byte offset of the next `</tool_call>` close that is NOT inside a `<parameter=...>...</parameter>` block. Qwen3-Coder tool arguments may c
crates/spark-server/src/tool_parser/parse_dispatch.rs:85
↓ 1 callersFunctionfind_xcrun
()
crates/atlas-kernels/build_target.rs:346
↓ 1 callersMethodfinish_leaf_snapshot
#155: save the finish-leaf SSM snapshot at sequence retire (called by `cache_sequence_dispatch` before the radix insert). End-of-prefill-only leaves m
crates/spark-model/src/model/trait_impl/decode_checkpoint.rs:182
↓ 1 callersMethodfirst_character_mask
The set of bytes that can be the first byte of an accepted token. Port of `GetFirstCharacterMask`.
crates/xgrammar/src/compiler/mask_gen/mod.rs:111
↓ 1 callersFunctionfirst_div
(a, b)
bench/warm_cold_chat_diff.py:102
↓ 1 callersFunctionfirst_div
(a, b)
bench/warm_cold_multiturn_diff.py:86
↓ 1 callersFunctionfirst_divergence
First index where token streams (or text fallback) differ; -1 if equal.
bench/warm_cold_specdecode_diff.py:101
↓ 1 callersFunctionflush_buffered_tool_chunks
Flush all buffered SSE chunks for tool-call `idx` into `sse_events`. No-op when retry is disabled (chunks were emitted directly).
crates/spark-server/src/api/chat_stream/tool_handlers.rs:46
↓ 1 callersFunctionfootnote_citations
Parse markdown footnote references: every `[^label]` in text paired with a `[^label]: url [title]` definition.
crates/spark-server/src/citation.rs:77
↓ 1 callersMethodforced_from_bitmask
Inspect an already-filled next-token bitmask for the forced-token condition — the zero-extra-work coalescence entry point for a caller that just ran `
crates/xgrammar/src/api/matcher.rs:128
↓ 1 callersFunctionforced_grammar_ebnf
EBNF wrapping `FORCED_LITERAL` as the sole root production.
crates/xgrammar/benches/grammar_bench.rs:235
↓ 1 callersFunctionforced_token_fastpath_enabled
Whether the grammar forced-token fast-path is enabled (default `true`; disabled by `ATLAS_DISABLE_FORCED_TOKEN=1`/`true`).
crates/spark-server/src/scheduler/helpers.rs:293
↓ 1 callersFunctionforced_tokens
Load the teacher-forcing list from `ATLAS_FORCE_TOKENS_FILE` (newline-separated token ids; position 0 replaces the first sampled token). Two runs fed
crates/spark-model/examples/metal_qwen35_inference/eval_io.rs:24
↓ 1 callersFunctionformat_f64
Render an `f64` without a trailing `.0` for integral values, the same shape picojson produces for non-integer-flagged numbers.
crates/xgrammar/src/structural_tag/json_serialize.rs:62
↓ 1 callersFunctionformat_gemma4_value
Format a JSON value in Gemma-4 native notation.
crates/spark-server/src/tool_parser/helpers_b.rs:35
↓ 1 callersFunctionformat_number
Render a non-integer double the way picojson does (shortest round-trippable form).
crates/xgrammar/src/schema/cache_key.rs:108
↓ 1 callersMethodformat_property
Format a `key: value` property. Port of `FormatProperty` plus the XML override.
crates/xgrammar/src/schema/gen_object.rs:24
↓ 1 callersFunctionformat_table
Render the result dict as a markdown table on stdout.
tests/atlas_bench_comprehensive.py:219
↓ 1 callersMethodformat_tool_response
(&self, content: &str)
crates/spark-server/src/tool_parser/gemma4.rs:61
↓ 1 callersMethodforward_atomic_c4_decode
C=4 NVFP4 routed MoE decode with FP32 atomic accumulation. Gate/top-K remain batched. Gate+up reuses the token-major kernel, then routed down project
crates/spark-model/src/layers/moe/forward_atomic_c4.rs:14
↓ 1 callersMethodforward_batched
Batched forward over N images. M-agnostic ops (patch_embed + all 27 blocks' GEMMs/norms/gelu/residuals) run ONCE over M=Σpᵢ; per-image- geometry stage
crates/spark-model/src/layers/vision_encoder/enc_impl/forward.rs:47
↓ 1 callersMethodforward_block
( &self, last_token: u32, position: usize, ctx: &ForwardContext, strea
crates/spark-model/src/layers/dflash_head/forward_block.rs:16
↓ 1 callersMethodforward_block_layer
Run one drafter transformer layer. Mutates `self.scratch.*` buffers in place, leaving `stream_buf` updated with the layer's output.
crates/spark-model/src/layers/dflash_head/forward_block_layer.rs:36
↓ 1 callersMethodforward_cuda
Forward pass with three parts: 1. Input projection 2. Core attention (custom op) 3. Output projection
bench/fp8_dgx2_drift/vllm_src/gdn_linear_attn.py:722
↓ 1 callersFunctionforward_full_attention
( gpu: &dyn GpuBackend, cfg: &Qwen35ForwardConfig, k: &Qwen35Kernels, layer: &FullAttentionLay
crates/spark-model/src/forward/qwen3_5/full_attention.rs:16
↓ 1 callersFunctionforward_linear_attention
( gpu: &dyn GpuBackend, cfg: &Qwen35ForwardConfig, k: &Qwen35Kernels, layer: &LinearAttentionL
crates/spark-model/src/forward/qwen3_5/linear_attention.rs:18
↓ 1 callersMethodforward_one
( &self, token: u32, target_hidden: DevicePtr, position: usize, state:
crates/spark-model/src/layers/deepseek_v4_mtp.rs:175
↓ 1 callersMethodforward_oversized_fallback
( &self, images: &[(&[f32], usize, usize)], p_i: &[usize], mp_i: &[usize],
crates/spark-model/src/layers/vision_encoder/enc_impl/forward.rs:210
↓ 1 callersMethodforward_prefill
N-token prefill: GEMM for all projections.
crates/spark-model/src/layers/dense_ffn.rs:989
↓ 1 callersMethodforward_prefill_bf16
( &self, input: DevicePtr, num_tokens: usize, ctx: &ForwardContext, st
crates/spark-model/src/layers/moe/forward_prefill_bf16.rs:11
↓ 1 callersMethodforward_prefill_fp8
EP token dispatch/combine forward pass (Workstream 3A scaffold). Instead of dense all-reduce, this: 1. Runs gate projection to get top-K routing 2. B
crates/spark-model/src/layers/moe/forward_prefill_fp8.rs:19
↓ 1 callersMethodforward_token_major_decode
Token-major fused decode for small N>=4. This reuses the generic `moe_prefill` kernels without the sorted/grouped GEMM path. It batches gate/top-k an
crates/spark-model/src/layers/moe/forward_token_major.rs:19
↓ 1 callersFunctionfp8_fp8_gemm_n128
FP8×FP8 GEMM: A [M, K] FP8 × B [N, K] FP8 → C [M, N] BF16. Both A (activations) and B (weights) are pre-converted FP8 E4M3. No BF16→FP8 conversion in
crates/spark-model/src/layers/ops/gemm_quant.rs:21
↓ 1 callersFunctionfp8_fp8_gemm_n128_m128
( gpu: &dyn GpuBackend, kernel: KernelHandle, a_fp8: DevicePtr, b_fp8: DevicePtr, output:
crates/spark-model/src/layers/ops/gemm_quant.rs:82
↓ 1 callersFunctionfp8_gemm_act_weight_t_blkscaled
( act_fp8: u64, act_scale: u64, weight_fp8: u64, weight_block_scale: u64, out: u64, m:
crates/spark-runtime/src/cublaslt/fp8.rs:150
← previousnext →2,601–2,700 of 7,049, ranked by callers