Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Avarok-Cybersecurity/atlas
/ functions
Functions
7,049 in github.com/Avarok-Cybersecurity/atlas
⨍
Functions
7,049
◇
Types & classes
847
↓ 14 callers
Function
parse_config
(json: &str)
crates/atlas-core/src/config/dispatch.rs:18
↓ 14 callers
Method
physical_block_for
(&self, abs_block_idx: usize)
crates/spark-model/src/traits.rs:191
↓ 14 callers
Method
pop_last_states
Remove the last `count` input positions — the rollback used by the matcher to undo speculatively-consumed tokens. Advancing `count` bytes then `pop_la
crates/xgrammar/src/earley/parser_api.rs:20
↓ 14 callers
Function
quantized
Build a QuantizedWeight from the store using the standard NVFP4 naming. `weight_scale_2` is a single FP32 scalar — extracted from GPU via D2H copy.
crates/spark-model/src/weight_map/model_a.rs:103
↓ 14 callers
Method
record_score
Update the predictor-score record for `slot`.
crates/spark-storage/src/eviction.rs:49
↓ 14 callers
Function
residual_add_rms_norm
( gpu: &dyn GpuBackend, kernel: KernelHandle, hidden: DevicePtr, src: DevicePtr, weight: &
crates/spark-model/src/layers/ops/norm.rs:83
↓ 14 callers
Function
rms_norm_residual
Fused RMS norm + residual save: normed = rms_norm(input), residual = input. Eliminates a separate D2D copy by writing the raw input to the residual b
crates/spark-model/src/layers/ops/norm.rs:51
↓ 14 callers
Method
ssm_qkvz_size
SSM projection output size: Q + K + V + Z concatenated.
crates/atlas-core/src/config/methods.rs:76
↓ 14 callers
Function
w4a16_gemm_n128
( gpu: &dyn GpuBackend, kernel: KernelHandle, input: DevicePtr, weight: &QuantizedWeight,
crates/spark-model/src/layers/ops/gemm_dense.rs:237
↓ 14 callers
Method
with_token_ids
`return_token_ids`: stamp the exact sampled token IDs onto this chunk's first choice. No-op when `ids` is empty, so requests that did not opt in keep
crates/spark-server/src/openai/stream_chunk.rs:324
↓ 13 callers
Method
add_cache
Add a `(cache_key -> rule_name)` mapping in the layer-correct cache. Port of `AddCache`.
crates/xgrammar/src/schema/converter.rs:136
↓ 13 callers
Method
add_empty_rule
Add a body-less rule (`body_expr_id = -1`). The body must be set later with [`GrammarBuilder::update_rule_body`]. Useful when the rule id is needed to
crates/xgrammar/src/grammar/builder_rules.rs:58
↓ 13 callers
Function
cache_acquires_disk_refs
Apply the disk-ref obligation reported by a `prefix_cache.insert*` call. The cache returns the disk_block_ids on which it newly took an ownership ref
crates/spark-model/src/model/block_mgmt.rs:86
↓ 13 callers
Method
cmp
(&self, other: &Self)
crates/xgrammar/src/fsm/edge.rs:105
↓ 13 callers
Method
config
(&self)
crates/spark-server/src/rate_limiter.rs:203
↓ 13 callers
Method
conv_state
(&self, ssm_layer_idx: usize, slot: usize)
crates/spark-model/src/model/ssm_pool.rs:224
↓ 13 callers
Method
forward
Forward pass: gate → top-K routing → batched expert FFN → blend. All expert dispatch stays on device — zero D2H synchronization. 9 kernel launches pe
crates/spark-model/src/layers/moe/forward.rs:28
↓ 13 callers
Method
gate_logits
(&self)
crates/spark-runtime/src/buffers.rs:235
↓ 13 callers
Method
group_bytes
Number of bytes a single group occupies on disk (== group_stride).
crates/spark-storage/src/group.rs:108
↓ 13 callers
Method
is_local_expert
Whether the given expert ID is local to this EP rank.
crates/atlas-core/src/config/methods.rs:120
↓ 13 callers
Method
load
( backend: &MetalGpuBackend, st: &SafeTensors, layer_idx: u32, group_size: u32
crates/spark-model/examples/metal_qwen35_inference/full_attention.rs:38
↓ 13 callers
Method
num_exprs
Number of expressions.
crates/xgrammar/src/grammar/data.rs:172
↓ 13 callers
Method
num_ssm_layers
Number of SSM (linear attention) layers.
crates/atlas-core/src/config/methods.rs:51
↓ 13 callers
Method
simplify_epsilon
Merge states linked by removable epsilon transitions. `a --eps--> b` is collapsible when either (1) `a` has no other outgoing edge, or (2) `b` has no
crates/xgrammar/src/fsm/simplify.rs:79
↓ 12 callers
Function
bitmask_size
(vocab_size: usize)
crates/xgrammar/src/matcher/bitmask.rs:29
↓ 12 callers
Method
compile_json_grammar
Compile the built-in JSON grammar (any valid JSON).
crates/spark-server/src/grammar/compile_misc.rs:67
↓ 12 callers
Function
cuStreamSynchronize
crates/atlas-kernels/hip/libcuda_hip_shim.cpp:67
↓ 12 callers
Method
decode
(&self, token: u32, seq: &mut SequenceState, _stream: u64)
crates/spark-model/src/model/trait_impl/mod.rs:78
↓ 12 callers
Function
dequant_fp8_blockscaled_to_bf16
Dequantize FP8 E4M3 block-scaled weight → BF16, entirely on the GPU. Block-scaled FP8 (e.g. `quant_method: "fp8"` with `weight_block_size: [128, 128]
crates/spark-model/src/weight_map/quant_helpers.rs:39
↓ 12 callers
Function
detect_nvfp4_variant
Detect the weight quantization variant from the weight store. Dispatch order matches vLLM / TRT-LLM / SGLang: 1. **Config-declared scheme** (`config.
crates/spark-model/src/weight_map/nvfp4_detect.rs:27
↓ 12 callers
Function
diag_norm_f32
Debug: read back FP32 GPU tensor and compute L2 norm + first 4 values. Used by the DeepSeek-V4 multi-seq decode diagnostic path (post/comb-attn hologr
crates/spark-model/src/layers/qwen3_attention/trait_impl.rs:52
↓ 12 callers
Method
err
Build a [`LexError`] at the current source position.
crates/xgrammar/src/grammar/lexer.rs:109
↓ 12 callers
Method
free_sequence
(&self, _seq: &mut SequenceState)
crates/spark-model/src/engine/tests.rs:239
↓ 12 callers
Method
is_object
Whether this value is a JSON object.
crates/xgrammar/src/schema/json_value.rs:51
↓ 12 callers
Method
launch_graph
Replay all operations captured in the graph on `stream`.
crates/spark-runtime/src/gpu.rs:243
↓ 12 callers
Method
peek
(&self)
crates/xgrammar/src/schema/json_value.rs:116
↓ 12 callers
Method
push_row
Append a new row from a slice; returns the new row's index.
crates/xgrammar/src/fsm/compact_array.rs:58
↓ 12 callers
Function
require_server
()
crates/atlas-spark-bench/src/lib.rs:30
↓ 12 callers
Method
send
(idx)
scripts/dev/test_bugfixes.py:152
↓ 12 callers
Method
skip
(self, name: str, reason: str)
scripts/dev/test_bugfixes.py:82
↓ 12 callers
Function
st
(temp: f32, zone: GenerationZone)
crates/spark-server/src/adaptive_sampler.rs:215
↓ 12 callers
Method
vit_gemm_bias
( &self, gpu: &dyn GpuBackend, a: DevicePtr, b: DevicePtr, bias: Devic
crates/spark-model/src/layers/vision_encoder/enc_impl/vit_block.rs:19
↓ 11 callers
Method
add
Add `element` as its own singleton set. Returns `true` if inserted, `false` if it already existed.
crates/xgrammar/src/support/union_find.rs:32
↓ 11 callers
Method
add_rule_edge
Add a rule-reference edge for `rule_id`.
crates/xgrammar/src/fsm/fsm.rs:110
↓ 11 callers
Method
clear
Drop every cached entry. Port of `RuleLevelCache::ClearCache`.
crates/xgrammar/src/compiler/rule_cache.rs:198
↓ 11 callers
Method
compile_hermes_tool_grammar
Compile a grammar for Hermes-format tool calls. Hermes format: `<tool_call>{"name":"fn","arguments":{...}}</tool_call>` Builds raw structural tag JS
crates/spark-server/src/grammar/compile_tools.rs:171
↓ 11 callers
Function
compile_optimized_grammar
Compile an already-optimized grammar against `tokenizer_info`. Port of `GrammarCompilerSub::MultiThreadCompileGrammar`. The grammar passed in MUST al
crates/xgrammar/src/compiler/compile.rs:49
↓ 11 callers
Method
compile_qwen3_coder_tool_grammar
Compile a grammar for Qwen3-Coder XML tool calls. Format: `<tool_call>\n<function=name>\n<parameter=key>\nvalue\n</parameter>\n</function>\n</tool_ca
crates/spark-server/src/grammar/compile_tools.rs:332
↓ 11 callers
Method
copy
A deep copy.
crates/xgrammar/src/fsm/with_start_end.rs:153
↓ 11 callers
Method
copy_logits_to_host
(&self, logits_ptr: DevicePtr, dst: &mut [u8])
crates/spark-model/src/engine/tests.rs:165
↓ 11 callers
Method
decode_logits_ptr
(&self)
crates/spark-model/src/model/trait_impl/mod.rs:382
↓ 11 callers
Function
f32_to_bf16
(x: f32)
crates/spark-runtime/src/cutlass/tests/mod.rs:24
↓ 11 callers
Function
f32_to_bf16_bits
(v: f32)
crates/spark-model/src/layers/vision_encoder/enc_impl/mod.rs:28
↓ 11 callers
Method
get
Look up the cached mask for `key`, marking it most-recently-used on a hit. Port of `RuleLevelCache::GetCache`.
crates/xgrammar/src/compiler/rule_cache.rs:134
↓ 11 callers
Method
is_override
True iff the loader should override the inherited path.
crates/spark-model/src/precision_schedule.rs:122
↓ 11 callers
Function
launch
Per-kernel launch geometry. Add a new arm when a rewritten kernel lands so the harness can A/B old vs new on identical inputs.
crates/spark-model/examples/w8a16_microtest.rs:157
↓ 11 callers
Method
lm_head
(&self, hidden: DevicePtr, stream: u64)
crates/spark-model/src/model/impl_a3.rs:192
↓ 11 callers
Function
load_bf16
Load a BF16 tensor from an open safetensors file handle.
scripts/dev/verify_mistral_layer0.py:84
↓ 11 callers
Function
mtp_grammar_mask_for
Fill the XGrammar bitmask for the current matcher position and clone it into an owned `Vec<i32>` the caller can pass into MTP draft sampling. Returns
crates/spark-server/src/scheduler/spec_step.rs:382
↓ 11 callers
Method
names
Iterator over all weight names.
crates/spark-runtime/src/weights.rs:131
↓ 11 callers
Function
ptr
Extract a DevicePtr from the weight store by name.
crates/spark-model/src/weight_map/model_a.rs:26
↓ 11 callers
Method
push_row
Append `new_data` as a fresh row; returns its row index.
crates/xgrammar/src/support/compact_2d_array.rs:90
↓ 11 callers
Function
quantized_v2
Build a QuantizedWeight from Sehyo/compressed-tensors NVFP4 naming convention. Sehyo quantization uses: weight_packed, weight_scale, weight_global_sc
crates/spark-model/src/weight_map/quant_helpers.rs:338
↓ 11 callers
Method
rank
Return slot indices in eviction-preference order (most-evictable first), excluding `pinned` slots.
crates/spark-storage/src/eviction.rs:66
↓ 11 callers
Method
resolve
Look up every kernel the per-layer forward needs. Fails loudly if any are missing — better to surface that at startup than silently mid-decode.
crates/spark-model/src/forward/qwen3_5/mod.rs:172
↓ 11 callers
Function
rope_yarn
( gpu: &dyn GpuBackend, kernel: KernelHandle, q: DevicePtr, k: DevicePtr, positions: Devic
crates/spark-model/src/layers/ops/embeddings.rs:187
↓ 11 callers
Method
run_mtp_propose_multi
( &self, _token: u32, _position: usize, _num_drafts: usize, _seq: &mut
crates/spark-model/src/engine/tests.rs:300
↓ 11 callers
Method
save_hidden_for_mtp
(&self, _token_idx: usize, _stream: u64)
crates/spark-model/src/engine/tests.rs:286
↓ 11 callers
Method
tag_dispatch
Decode a `TagDispatch` expression. Panics if `expr_id` is not a tag dispatch (matches the C++ `XGRAMMAR_DCHECK`).
crates/xgrammar/src/grammar/data.rs:206
↓ 11 callers
Method
take_ids_if
Take the IDs buffered since the last emit when the request opted into `return_token_ids`; otherwise return empty (the builder no-ops on empty, so the
crates/spark-server/src/api/chat_stream/token_ids.rs:16
↓ 11 callers
Function
up
(gpu: &dyn GpuBackend, b: &[u8])
crates/spark-model/examples/int8_gemm_test.rs:29
↓ 11 callers
Method
vocab_size
The vocabulary size. Port of the vendored `vocab_size`.
crates/xgrammar/src/api/tokenizer.rs:73
↓ 10 callers
Method
_post
(self, endpoint: str, payload: dict, timeout: int = 90)
scripts/dev/test_bugfixes.py:34
↓ 10 callers
Method
accept_token
Accept a sampled token and advance the grammar state. Returns `true` if the token was accepted by the grammar. Returns `false` if the token violates
crates/spark-server/src/grammar/state.rs:193
↓ 10 callers
Function
anthropic_to_chat_request_json
(req: &MessagesRequest)
crates/spark-server/src/anthropic/translate.rs:143
↓ 10 callers
Function
argmax_bf16
GPU-side argmax over BF16 logits. Finds the index of the maximum value, writes a single u32 to `out`. Kernel: `argmax_bf16(logits, out, n)` Grid: (1
crates/spark-model/src/layers/ops/sampling.rs:22
↓ 10 callers
Function
bind
( kl: KernelLaunch<'a>, h: DevicePtr, qp: DevicePtr, kp: DevicePtr, vp: DevicePtr, gp:
crates/spark-model/examples/gdn_regresident_microtest.rs:93
↓ 10 callers
Method
compile
( &self, source: &Path, output: &Path, arch: &str, extra_flags: &[Stri
crates/atlas-core/src/compute.rs:168
↓ 10 callers
Function
conv1d_update_l2norm
( gpu: &dyn GpuBackend, kernel: KernelHandle, conv_state: DevicePtr, input: DevicePtr, wei
crates/spark-model/src/layers/ops/ssm_mamba.rs:58
↓ 10 callers
Method
create
Create a new conversation with optional initial items and metadata. Returns the generated id.
crates/spark-server/src/conversation_store.rs:92
↓ 10 callers
Function
dense_keep_f32
Load a weight and ensure it's FP32 on GPU, regardless of source dtype. Used for SSM gate parameters (A_log, dt_bias) where BF16 precision causes expo
crates/spark-model/src/weight_map/model_a.rs:225
↓ 10 callers
Function
dequant_fp8_to_bf16
Dequantize FP8 E4M3 + per-tensor scale → BF16, returning a DenseWeight. Allocates a new GPU buffer for the result. Use `dequant_fp8_to_bf16_into` to
crates/spark-model/src/weight_map/model_a.rs:429
↓ 10 callers
Method
device_symbol
Resolve a `__device__` symbol in a loaded PTX module to its device pointer + byte length. Required for drivers that read/write device globals without
crates/atlas-core/src/registry.rs:282
↓ 10 callers
Function
disable_watchdogs
Whether all auto-watchdogs are disabled at runtime. `false` by default; flipped only when `ATLAS_DISABLE_WATCHDOGS=1`/`true`.
crates/spark-server/src/scheduler/helpers.rs:198
↓ 10 callers
Method
embed
(&self, token: u32, output: DevicePtr, stream: u64)
crates/spark-model/src/model/impl_a3.rs:31
↓ 10 callers
Function
entry
(id: &str, kind: StoredKind)
crates/spark-server/src/response_store/tests.rs:5
↓ 10 callers
Function
fmt
(x: float)
bench/phase2c-kv-sweep/compare-configs.py:49
↓ 10 callers
Function
fp8_gemm_n128
( gpu: &dyn GpuBackend, kernel: KernelHandle, input: DevicePtr, b_fp8: DevicePtr, output:
crates/spark-model/src/layers/ops/gemm_dense.rs:404
↓ 10 callers
Method
free_block
Free a previously allocated block (decrements ref, frees if count hits 0).
crates/spark-runtime/src/kv_cache/paged_impl.rs:178
↓ 10 callers
Method
get_new_rule_name
Find an unused rule name starting from `name_hint`, appending an integer suffix (`_1`, `_2`, …) on collision. The first probed suffix is read from `n
crates/xgrammar/src/grammar/builder_rules.rs:147
↓ 10 callers
Function
hash_token_prefix
FNV-1a-ish stable hash for the first `count` tokens — used to key snapshots independently of the radix tree (allows the same prefix hash to be reprodu
crates/spark-runtime/src/radix_tree.rs:27
↓ 10 callers
Function
inject_hints
Run all registered hint injectors on a tool response. Returns the first matching hint (specific injectors first, generic last).
crates/spark-server/src/hint_injector.rs:228
↓ 10 callers
Method
insert_with_snapshot
( &self, tokens: &[u32], block_table: &[u32], disk_block_ids: &[u32],
crates/spark-runtime/src/radix_tree.rs:124
↓ 10 callers
Method
is_completed
True if the root rule has completed at the current input position — i.e. the stop token may be emitted now.
crates/xgrammar/src/earley/parser.rs:148
↓ 10 callers
Method
is_wht_rotated
True for the symmetric turbo dtypes whose cache contents are stored in the WHT-rotated basis (the write path applies `wht_bf16_inplace` before quantiz
crates/spark-runtime/src/kv_cache.rs:123
↓ 10 callers
Method
len
Number of rows.
crates/xgrammar/src/support/compact_2d_array.rs:42
↓ 10 callers
Method
len
(&self)
crates/spark-server/src/response_store/store_impl.rs:179
↓ 10 callers
Function
literal
(bytes: &[u8])
crates/xgrammar/src/fsm/simplify_tests.rs:9
↓ 10 callers
Function
log_cutlass_nvfp4_route
(name: &str, m: u32, n: u32, k: u32)
crates/spark-model/src/layers/ops/dispatch_helpers.rs:91
↓ 10 callers
Function
mask_of
`mask` where token id `id` is a boundary iff `id` is in `boundary_ids`.
crates/spark-server/src/scheduler/rollback_tests.rs:21
← previous
next →
301–400 of 7,049, ranked by callers