MCPcopy Create free account

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

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

↓ 42 callersMethodadd
Add `element` as its own singleton set. Returns `false` if it was already present.
crates/xgrammar/src/fsm/union_find.rs:29
↓ 42 callersMethodattn_output
(&self)
crates/spark-runtime/src/buffers.rs:232
↓ 42 callersMethodconsume
Consume `cnt` bytes, updating line/column tracking.
crates/xgrammar/src/grammar/lexer.rs:76
↓ 42 callersFunctioncopy_h_to_d_async
(dst: u64, src: *const c_void, bytes: usize, stream: u64)
crates/spark-storage/src/cuda_min.rs:146
↓ 42 callersFunctionload_bf16
(path: str, vocab: int)
tests/metal_kv_kld_compare.py:22
↓ 42 callersFunctionwrite
(t, rel, content)
bench/fp8_dgx2_drift/harness/overnight/edit_probe2.py:60
↓ 41 callersMethodas_mut_ptr
(&mut self)
crates/spark-runtime/src/fast_weights/direct_io.rs:47
↓ 41 callersMethodas_object
Borrow as an object's entry slice, if it is one.
crates/xgrammar/src/schema/json_value.rs:56
↓ 41 callersFunctiondump_bf16
Snapshot `n_elements` BF16 values starting at `ptr + byte_offset`, widen to f32 little-endian, write to `<ATLAS_OP_DUMP>/atlas_op_L{layer_idx}_{op}.bi
crates/spark-model/src/layers/qwen3_attention/op_dump.rs:68
↓ 41 callersMethodpath
Absolute path of the dump file (for startup logging).
crates/spark-server/src/request_dumper.rs:63
↓ 40 callersFunctionmaybe_backend
Construct a `MetalGpuBackend` for tests, or return `None` if the host can't open a Metal device. CI runners (especially virtualised macOS hosts on Git
crates/spark-runtime/src/metal_backend/tests/helpers.rs:18
↓ 40 callersMethodssm_qkvz
(&self)
crates/spark-runtime/src/buffers.rs:250
↓ 39 callersMethodedges
Outgoing edges of `state`.
crates/xgrammar/src/fsm/fsm.rs:60
↓ 38 callersMethodblock_size
(&self)
crates/spark-runtime/src/kv_cache/paged_impl.rs:428
↓ 38 callersMethodfsm
The underlying FSM.
crates/xgrammar/src/fsm/with_start_end.rs:42
↓ 38 callersMethodget
Finish building and return the [`GrammarData`], setting the root rule to the rule with `root_rule_name`. Returns `Err` if the named rule is not prese
crates/xgrammar/src/grammar/builder.rs:114
↓ 38 callersFunctionsorted
(set: &AHashSet<i32>)
crates/xgrammar/src/fsm/traversal.rs:107
↓ 37 callersFunctionopenai_error_response
(status: StatusCode, message: String)
crates/spark-server/src/api/compact.rs:174
↓ 37 callersMethodrecord
Reserve the snapshot slot the next boundary should be written into, registering the `(token_position, slot)` entry. When the ring is full this **evic
crates/spark-server/src/scheduler/ssm_decode_ring.rs:98
↓ 36 callersMethodadd_rule_ref
Add a `RuleRef` expr pointing at `rule_id`.
crates/xgrammar/src/grammar/builder.rs:199
↓ 36 callersFunctionapi
(endpoint: str, payload: dict, timeout: int = 300)
scripts/test_coherence.py:21
↓ 36 callersMethodcontains_key
Whether an object contains `key`.
crates/xgrammar/src/schema/json_value.rs:96
↓ 36 callersMethodmemset
(&self, ptr: DevicePtr, value: u8, bytes: usize)
crates/spark-runtime/src/gpu/mock.rs:156
↓ 36 callersMethodnum_states
Number of states.
crates/xgrammar/src/fsm/fsm.rs:45
↓ 36 callersMethodparse_error
Build a [`ParseError::Parse`] anchored at `peek(delta_element)`.
crates/xgrammar/src/grammar/parser.rs:96
↓ 36 callersMethodset
Set / clear token id `token`. Panics if `token >= vocab_size`.
crates/xgrammar/src/matcher/bitmask.rs:119
↓ 35 callersFunctionbytes_to_bf16_vec
(bytes: &[u8])
crates/spark-runtime/src/metal_backend/tests/helpers.rs:47
↓ 35 callersMethodload
Load a `(.weight, .scales, .biases)` triplet from a parsed safetensors blob and upload to the GPU. `base` is the tensor name minus the suffix (e.g. `"
crates/spark-runtime/src/weights/mlx_int8.rs:79
↓ 35 callersMethodstart
The start state id.
crates/xgrammar/src/fsm/with_start_end.rs:52
↓ 34 callersMethodget_or_init
Get or initialize the global registry. First call loads all PTX modules and creates the persistent stream. Subsequent calls return the cached registr
crates/atlas-core/src/registry.rs:126
↓ 34 callersFunctionoptimized
Build an optimized, FSM-accelerated grammar from an EBNF string.
crates/xgrammar/src/earley/tests.rs:15
↓ 34 callersMethodvocab_size
Vocabulary size (determines bitmask width).
crates/spark-server/src/grammar/engine.rs:144
↓ 33 callersMethodlogits
(&self)
crates/spark-runtime/src/buffers.rs:247
↓ 33 callersMethodlookup
Find deepest snapshot matching session within matched_tokens range.
crates/spark-runtime/src/radix_tree/snapshot.rs:69
↓ 32 callersMethodrelease
Free the three GPU buffers backing this weight. Idempotent if the pointers are null. Call this at model teardown — there's no Drop because `MlxInt8Wei
crates/spark-runtime/src/weights/mlx_int8.rs:356
↓ 31 callersMethodclear
Remove every element.
crates/xgrammar/src/fsm/union_find.rs:38
↓ 31 callersMethodcontains
True if `element` has been added.
crates/xgrammar/src/fsm/union_find.rs:43
↓ 31 callersFunctionemit_token
Emit a token for an active sequence (stream + bookkeeping). Per OpenAI spec, stop/EOS tokens are NOT streamed to the client — the returned text must
crates/spark-server/src/scheduler/emit_step.rs:15
↓ 31 callersFunctionrecord
(name: str, status: str, detail: str = "")
tests/test_openai_compat_v2.py:59
↓ 31 callersFunctionstream_sync
(stream: u64)
crates/spark-storage/src/cuda_min.rs:163
↓ 30 callersMethodadd_empty_str
Add an `EmptyStr` expr (the empty string `""`).
crates/xgrammar/src/grammar/builder.rs:194
↓ 30 callersMethodas_any_mut
(&mut self)
crates/spark-model/src/layers/mtp_head.rs:76
↓ 30 callersMethodas_fp8
Extract as FP8, if this weight is that variant.
crates/spark-model/src/weight_map/expert.rs:151
↓ 30 callersMethodempty
()
crates/spark-server/src/lqer.rs:94
↓ 30 callersMethodfinish
Finalize: close any trailing static run and return the segments.
crates/xgrammar/src/compiler/decompose.rs:399
↓ 30 callersMethodis_end_state
True if `state` is accepting.
crates/xgrammar/src/fsm/with_start_end.rs:62
↓ 30 callersFunctionlog
(msg)
scripts/dev/overnight_marathon.py:85
↓ 30 callersMethodstate
(&mut self)
crates/xgrammar/src/grammar/functor/optimizer.rs:32
↓ 29 callersMethodas_nvfp4
Extract as NVFP4, if this weight is that variant.
crates/spark-model/src/weight_map/expert.rs:143
↓ 29 callersMethodload
()
crates/cufile-sys/src/lib.rs:109
↓ 29 callersMethodroot_rule_id
The root rule id (`-1` if unset).
crates/xgrammar/src/grammar/data.rs:157
↓ 29 callersMethodssm_deinterleaved
Sequential [Q|K|V|Z] after deinterleaving.
crates/spark-runtime/src/buffers.rs:257
↓ 29 callersMethodtokenizer_info
(&self)
crates/xgrammar/src/matcher/matcher.rs:147
↓ 29 callersFunctionw4a16_gemv
W4A16 GEMV (M=1): C = A @ dequant(B) for single-row activations. A: [1, K] BF16, B: NVFP4 packed, C: [1, N] BF16. 4 outputs/block, 64 threads (2 warp
crates/spark-model/src/layers/ops/quant_dispatch.rs:94
↓ 28 callersFunctionchk
(status: i32, what: &str)
crates/spark-runtime/src/cublaslt.rs:145
↓ 28 callersMethodlayer_type
Layer type for a given layer index. Falls back to full_attention_interval if layer_types is empty.
crates/atlas-core/src/config/methods.rs:21
↓ 27 callersMethodcheck
(self, name: str, passed: bool, detail: str = "")
scripts/dev/test_bugfixes.py:71
↓ 27 callersFunctiondevice_alloc
(bytes: usize)
crates/spark-runtime/src/cutlass/tests/mod.rs:38
↓ 27 callersFunctiongrammar_from_format
Build a grammar from a structural-tag format object (the `format` body), wrapping it in the full `structural_tag` document.
crates/xgrammar/src/structural_tag/tests.rs:34
↓ 27 callersMethodhidden_states
(&self)
crates/spark-runtime/src/buffers.rs:220
↓ 27 callersFunctionparse_ebnf_default
Parse a grammar string with the default root rule name `"root"`.
crates/xgrammar/src/grammar/parser.rs:230
↓ 26 callersFunctioncompiler
A cache-enabled compiler bound to [`small_tokenizer`].
crates/xgrammar/src/compiler/tests/mod.rs:40
↓ 26 callersMethoderror
Build a [`RegexError`] at the current 1-based position — the C++ `RaiseError` offset is `current_ - start_ + 1`.
crates/xgrammar/src/regex/cursor.rs:99
↓ 26 callersMethodexpert_up_out
Batched expert up projection output.
crates/spark-runtime/src/buffers.rs:288
↓ 26 callersMethodget
Get a weight tensor by name. Fails fast if not found.
crates/spark-runtime/src/weights.rs:109
↓ 26 callersFunctionrecord
Record the elapsed time since `since` under `phase`. No-op when disarmed.
crates/spark-server/src/scheduler/mtp_timing.rs:92
↓ 26 callersFunctionw4a16_gemm
W4A16 GEMM: C = A @ dequant(B). A: [M, K] BF16 activations B: NVFP4 packed weights (E2M1 + FP8 scales + FP32 per-tensor scale) C: [M, N] BF16 output
crates/spark-model/src/layers/ops/gemm_dense.rs:149
↓ 25 callersMethodadd_rule_named
Add a rule with the given `name` and `body_expr_id`.
crates/xgrammar/src/grammar/builder_rules.rs:27
↓ 25 callersMethodas_bool
Borrow as a bool, if it is one.
crates/xgrammar/src/schema/json_value.rs:80
↓ 25 callersMethodis_none
(&self)
crates/spark-server/src/tool_parser.rs:124
↓ 25 callersMethodnum_rules
Number of rules.
crates/xgrammar/src/grammar/data.rs:136
↓ 24 callersFunctioncoerce_all
Apply schema-driven type coercion to all calls in `calls`. Matches each call to its [`ToolDefinition`] by name, then rewrites JSON-string argument va
crates/spark-server/src/tool_parser/type_coerce.rs:11
↓ 24 callersMethodcopy_d2d
(&self, _src: DevicePtr, _dst: DevicePtr, _bytes: usize)
crates/spark-runtime/src/gpu/mock.rs:123
↓ 24 callersMethodpartial_cmp
(&self, other: &Self)
crates/xgrammar/src/fsm/edge.rs:100
↓ 24 callersFunctionpost
(url: str, body: dict, timeout: float = 180.0)
bench/qwen36_correctness.py:27
↓ 24 callersFunctionsanitize_content_chunk
F73 (2026-04-29): test wrapper that defaults the new `inside_envelope: &mut bool` parameter. Tests in this module that pre-date F73 don't exercise env
crates/spark-server/src/api/tests/sanitizer.rs:23
↓ 24 callersFunctiontest_val
Deterministic pseudo-random bf16-representable test value in ~[-2, 2].
crates/spark-runtime/src/metal_backend/tests/helpers.rs:158
↓ 23 callersFunctionaccepted_ids
Fill a fresh bitmask for `m` and return the set of accepted token ids. Panics if the matcher has terminated.
crates/xgrammar/src/matcher/tests.rs:85
↓ 23 callersMethodcreate_stream
Create a new CUDA stream (for overlapping prefill with decode).
crates/spark-model/src/traits/model.rs:712
↓ 23 callersMethodexpert_gate_out
Batched expert gate projection output.
crates/spark-runtime/src/buffers.rs:284
↓ 23 callersFunctionload_fp8_block_scaled_as_fp8weight
Load an FP8 E4M3 block-scaled checkpoint weight as a native [`Fp8Weight`]. The FP8 checkpoint stores: - `{prefix}.weight`: FP8E4M3 tensor [N, K] - `{
crates/spark-model/src/weight_map/loaders_fp8.rs:32
↓ 23 callersFunctionopenai_error_response_with_param
OpenAI-compatible error with optional `param` (field path like `messages[0].role`) and `code` (e.g. `"context_length_exceeded"`).
crates/spark-server/src/api/compact.rs:180
↓ 23 callersMethodprocess
Feed a text delta. Returns events to emit (content or tool calls). Emits incremental ToolCallStart/ToolCallDelta/ToolCallEnd events so clients see too
crates/spark-server/src/tool_parser/streaming_impl.rs:58
↓ 23 callersFunctionregex_to_ebnf
Convert a regex string to an EBNF grammar string. When `with_rule_name` is `true` the result is wrapped as `root ::= <body>\n`; otherwise just the ru
crates/xgrammar/src/regex/mod.rs:74
↓ 22 callersMethodalloc_block
Allocate a free block. Returns block index.
crates/spark-runtime/src/kv_cache/paged_impl.rs:77
↓ 22 callersMethodbump
Advance one codepoint.
crates/xgrammar/src/regex/cursor.rs:75
↓ 22 callersMethodenqueue
Enqueue `state` for predict/complete unless already visited. Returns true if it was newly enqueued.
crates/xgrammar/src/earley/queue.rs:47
↓ 22 callersMethodep_broadcast_u32
Broadcast a u32 command from rank 0 to all ranks. Rank 0 writes `val` to GPU buffer and broadcasts. Other ranks receive the value and return it.
crates/spark-model/src/model/impl_a2.rs:269
↓ 22 callersMethodexpert_down_out
Batched expert down projection output.
crates/spark-runtime/src/buffers.rs:292
↓ 22 callersMethodis_empty
Whether the payload is empty.
crates/xgrammar/src/grammar/expr.rs:71
↓ 22 callersMethodpeek
The current codepoint (`*current_`), or `0` at the terminator — matching the C-string null terminator the C++ relies on.
crates/xgrammar/src/regex/cursor.rs:65
↓ 21 callersMethodadvance
Advance every scanable state by input byte `ch`. Returns true if `ch` is accepted by at least one state. When `ch` is rejected the parser state is le
crates/xgrammar/src/earley/parser.rs:171
↓ 21 callersFunctionbf16_bits_to_f32
(b: u16)
crates/spark-model/examples/int8_gemm_test.rs:1632
↓ 21 callersFunctioncheck_nccl
Convert NCCL result to anyhow::Result.
crates/spark-comm/src/nccl.rs:343
↓ 21 callersMethodcompile_grammar_from_ebnf
Compile a grammar from an EBNF string. Port of `GrammarCompiler::CompileGrammar(ebnf, root_rule_name)`.
crates/xgrammar/src/compiler/compiler.rs:154
↓ 21 callersMethodfill_bitmask
Fill the allowed-token bitmask for the next decode step. Returns `true` if the bitmask constrains at least one token (i.e., is not all-ones). When `f
crates/spark-server/src/grammar/state.rs:128
↓ 21 callersMethodflush
Flush remaining buffer (call at stream end). Also attempts bare `<function>` detection as a last resort.
crates/spark-server/src/tool_parser/streaming_impl.rs:325
↓ 21 callersMethodfree_memory
(&self)
crates/spark-runtime/src/gpu/mock.rs:172
↓ 21 callersMethodgemv
Decode-path matvec: `y = self_dequant @ x`. `x` must be BF16 `[in_features]`; `y` must be a BF16 buffer with at least `out_features` slots. Runs the f
crates/spark-runtime/src/weights/mlx_int8.rs:202
↓ 21 callersMethodnvfp4_data_bytes
NVFP4 data section bytes per block (packed E2M1 nibbles).
crates/spark-runtime/src/kv_cache.rs:362
← previousnext →101–200 of 7,049, ranked by callers