Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/FlashSampling/FlashSampling
/ functions
Functions
315 in github.com/FlashSampling/FlashSampling
⨍
Functions
315
◇
Types & classes
25
↳
Endpoints
9
↓ 1 callers
Function
_topk_merge_and_sample
( topk_logits: torch.Tensor, # [num_tiles, H, top_k] topk_idxs: torch.Tensor, # [num_tiles, H, top_k
src/fused_mm_sampling/tl_fused_mm_topk.py:76
↓ 1 callers
Function
_torchrun_worker
(fn: Callable, args: tuple)
src/fused_mm_sampling/tp_info.py:65
↓ 1 callers
Function
_validate_insertions
Check that we found all expected start/end pairs. Raises on missing scopes.
benchmarking/insert_proton_records.py:204
↓ 1 callers
Function
add_proton_records
Add proton.record statements to the FMMS kernel TTGIR file. Uses a two-pass approach: first scan for insertion points, then insert from botto
benchmarking/insert_proton_records.py:34
↓ 1 callers
Function
all_cases
(args: Args)
src/fused_mm_sampling/bench/speed_test.py:58
↓ 1 callers
Function
allocate_symm_mem_outputs
Allocate kernel output buffers (maxs, maxs_idx) in symmetric memory. Returns (maxs, maxs_idx, symm_mem_hdl, storage_offset_maxs_idx). maxs an
src/fused_mm_sampling/tensor_parallel_reduce.py:19
↓ 1 callers
Function
apply_flashsampling_rename
Rename FMMS columns/values to FlashSampling equivalents.
benchmarking/plot-triton-bench.py:599
↓ 1 callers
Function
apply_top_k_top_p
Apply top-k and top-p filtering and return probabilities. Single softmax.
src/fused_mm_sampling/core.py:84
↓ 1 callers
Function
apply_top_k_top_p_qitra
Apply top-k and top-p filtering using vLLM's Qitra Triton kernel and return probabilities.
src/fused_mm_sampling/core.py:113
↓ 1 callers
Function
apply_top_k_top_p_triton
Apply combined top-k and top-p masking using Triton. Top-k is applied first (by logit value), then top-p is applied to the remaining k v
src/fused_mm_sampling/qitra.py:806
↓ 1 callers
Function
assign_col_samples_per_ms
(df: pd.DataFrame)
benchmarking/plot-triton-bench.py:429
↓ 1 callers
Function
assign_col_time_ms
(df: pd.DataFrame)
src/fused_mm_sampling/bench/speed_test.py:197
↓ 1 callers
Function
bench
(M, N, K, dtype, reps=100, warmup_reps=100)
src/fused_mm_sampling/persistent_matmul.py:732
↓ 1 callers
Function
benchmark
Time kernel execution using CUDA events.
src/fused_mm_sampling/bench/speed_test.py:111
↓ 1 callers
Function
benchmark_all
(cases: list[Case])
src/fused_mm_sampling/bench/speed_test.py:153
↓ 1 callers
Function
bootstrap_ci
Bootstrap 95% CI for the mean of a binary array. Returns (lo%, hi%).
benchmarking/vllm/judge_eval.py:95
↓ 1 callers
Function
bsz_h
(H: int)
src/fused_mm_sampling/core.py:856
↓ 1 callers
Function
cdiv
(n: int, div: int)
src/fused_mm_sampling/core.py:206
↓ 1 callers
Function
collect_long_df
Read the per-TP batch-scaling CSVs and return a long DataFrame. When ``args.use_reruns`` is set, also load sibling ``{gpu}-rerun*`` folders s
benchmarking/plot_tp_scaling.py:29
↓ 1 callers
Function
create_and_triton_bench_plots
( folder: Path, fmt: str = "png", use_name_flashsampling: bool = False, skip_multinomial_eager
benchmarking/plot-triton-bench.py:493
↓ 1 callers
Function
create_benchmark
Create a benchmark function for a specific case.
src/fused_mm_sampling/bench/triton_benchmark_lib.py:112
↓ 1 callers
Function
cublas_matmul
(a, b)
src/fused_mm_sampling/bench/matmul_comparison.py:46
↓ 1 callers
Function
extract_reference
Extract the final numeric answer after '#### ' in the GSM8K answer string.
benchmarking/vllm/judge_eval.py:281
↓ 1 callers
Function
find_and_process_ttgir
Find all FMMS kernel TTGIR files in the dump directory and process them.
benchmarking/insert_proton_records.py:226
↓ 1 callers
Function
find_samples
Find the latest samples_gsm8k*.jsonl under eval_dir.
benchmarking/vllm/judge_eval.py:237
↓ 1 callers
Function
flashinfer_top_k_top_p_sampling_from_logits
( weights: torch.Tensor, # [V, D] hidden_states: torch.Tensor, # [n_hidden_states, D] num_sample
src/fused_mm_sampling/core.py:793
↓ 1 callers
Function
fused_mm_topk_triton
Fused matmul + per-tile top-k reduction. Returns: topk_vals: [num_tiles_v, H, top_k] float32 logits (temperature-scaled) topk_ids
src/fused_mm_sampling/tl_fused_mm_topk.py:38
↓ 1 callers
Function
fused_sample_helion_kernel
Stage 1: each (V, H) tile computes its local max and argmax in parallel.
src/fused_mm_sampling/helion_impl.py:26
↓ 1 callers
Function
gather_system_metadata
()
src/fused_mm_sampling/bench/sys_metadata.py:5
↓ 1 callers
Function
gpu_topology
()
src/fused_mm_sampling/bench/sys_metadata.py:41
↓ 1 callers
Function
is_hip
()
src/fused_mm_sampling/persistent_matmul.py:17
↓ 1 callers
Function
judge_dir
Judge all samples in an eval directory. Returns {doc_id: correct}.
benchmarking/vllm/judge_eval.py:161
↓ 1 callers
Function
judge_one
Ask the judge LLM whether the model's response matches the reference.
benchmarking/vllm/judge_eval.py:203
↓ 1 callers
Function
latest_run
Return the most recent timestamped subdirectory.
benchmarking/vllm/collect_results.py:24
↓ 1 callers
Function
latest_timestamp
(variant_dir: Path)
benchmarking/vllm/plot_tpot.py:55
↓ 1 callers
Function
leaky_relu
(x)
src/fused_mm_sampling/tl_matmul.py:131
↓ 1 callers
Function
load_all_data
(results_dir: Path, fmms_name: str)
benchmarking/vllm/plot_tpot.py:71
↓ 1 callers
Function
load_data
Load and combine NCU + Proton data into a DataFrame. Columns: bsz, method, matmul_us, sampling_us, total_us.
benchmarking/plot_bsz_sweep_runtime.py:42
↓ 1 callers
Function
load_existing_results
Load already-judged results keyed by doc_id, for resume support.
benchmarking/vllm/judge_eval.py:267
↓ 1 callers
Function
load_method
Load NCU data for a single method across all batch sizes. Kernel names are shortened and durations aggregated by short name, so multiple raw
benchmarking/plot_ncu_kernel_breakdown.py:58
↓ 1 callers
Function
load_samples
Load samples from a JSONL file, deduplicated by doc_id. lm-eval writes one line per (doc_id, filter) combination. The response text is the sa
benchmarking/vllm/judge_eval.py:246
↓ 1 callers
Function
main
()
src/fused_mm_sampling/persistent_matmul.py:833
↓ 1 callers
Function
main
()
src/fused_mm_sampling/modal_lib/modal_pytest_distributed_worker.py:6
↓ 1 callers
Function
main
()
tests/generate_inputs.py:18
↓ 1 callers
Function
main
()
examples/tensor_parallel.py:21
↓ 1 callers
Function
main
()
benchmarking/plot_bsz_sweep_runtime.py:200
↓ 1 callers
Function
main
()
benchmarking/plot_ncu_kernel_breakdown.py:26
↓ 1 callers
Function
main
()
benchmarking/parse_ncu_sweep.py:34
↓ 1 callers
Function
main
()
benchmarking/nsys_wrapper.py:91
↓ 1 callers
Function
main
()
benchmarking/vllm/parse_engine_stats.py:122
↓ 1 callers
Function
main
()
benchmarking/vllm/plot_tpot.py:369
↓ 1 callers
Function
main
()
benchmarking/vllm/collect_results.py:114
↓ 1 callers
Function
main
()
benchmarking/vllm/judge_eval.py:50
↓ 1 callers
Function
matmul
(a, b)
src/fused_mm_sampling/persistent_matmul.py:156
↓ 1 callers
Function
matmul_comparison_main
()
src/fused_mm_sampling/bench/matmul_comparison.py:64
↓ 1 callers
Function
matmul_descriptor_persistent
(a, b, warp_specialize: bool)
src/fused_mm_sampling/persistent_matmul.py:631
↓ 1 callers
Function
matmul_tma
(a, b, warp_specialize: bool)
src/fused_mm_sampling/persistent_matmul.py:250
↓ 1 callers
Function
matmul_tma_persistent
(a, b, warp_specialize: bool)
src/fused_mm_sampling/persistent_matmul.py:491
↓ 1 callers
Function
model_flops
FLOPs for the fused matmul: 2 * V * D * H.
benchmarking/plot-triton-bench.py:246
↓ 1 callers
Function
naive_method
(vocab_size: int, hidden_size: int, n_hidden_states: int)
benchmarking/hbm-access.py:18
↓ 1 callers
Function
next_power_of_2
(n: int)
src/fused_mm_sampling/qitra.py:23
↓ 1 callers
Function
nsys_profile
Run under nsys: warmup, sync ranks, then profile timed iterations.
src/fused_mm_sampling/bench/speed_test.py:131
↓ 1 callers
Function
num_compute_units
(device_index: int | None = None)
src/fused_mm_sampling/qitra.py:27
↓ 1 callers
Function
num_sms_cached
(device_index: int)
src/fused_mm_sampling/core.py:211
↓ 1 callers
Function
optimal_k
Source: https://cs.stanford.edu/people/mmahoney/cs369m/Lectures/lecture1.pdf
src/fused_mm_sampling/core.py:724
↓ 1 callers
Function
our_method
(vocab_size: int, hidden_size: int, n_hidden_states: int)
benchmarking/hbm-access.py:7
↓ 1 callers
Function
pad_to_tma_alignment
Pad D to 16-byte alignment for TMA on SM 90+ (H100, B200, etc.). TMA requires the innermost tensor dimension to be 16-byte aligned. For bf16
src/fused_mm_sampling/testing.py:75
↓ 1 callers
Function
paired_bootstrap
Paired bootstrap test: is there a significant difference between two variants? Both variants answer the same set of questions, so we use a *paire
benchmarking/vllm/judge_eval.py:104
↓ 1 callers
Function
paired_speedups
Compute paired speedup ratios between baseline and FMMS runs. Comparisons are made only within the same trial directory (e.g. Qwen3-8B-trial1
benchmarking/vllm/plot_tpot.py:91
↓ 1 callers
Function
parse_args
()
benchmarking/plot_ncu_kernel_breakdown.py:45
↓ 1 callers
Function
parse_args
()
benchmarking/vllm/judge_eval.py:289
↓ 1 callers
Function
parse_sweep_log
Parse engine stats grouped by benchmark run. Uses "Starting main benchmark run..." as the start delimiter and "Serving Benchmark Result" as t
benchmarking/vllm/parse_engine_stats.py:46
↓ 1 callers
Function
plot_batch_scaling
(bdf_long: pd.DataFrame)
benchmarking/plot-triton-bench.py:102
↓ 1 callers
Function
plot_breakdown
Stacked bar chart: one bar per batch size, one segment per kernel.
benchmarking/plot_ncu_kernel_breakdown.py:80
↓ 1 callers
Function
plot_memory_throughput
(bdf_long: pd.DataFrame, peak_bw_gbs: float | None = None)
benchmarking/plot-triton-bench.py:258
↓ 1 callers
Function
plot_relative_performance
( bdf_rel_long: pd.DataFrame, show_providers: list[str], use_errorbar: bool = False, )
benchmarking/plot-triton-bench.py:185
↓ 1 callers
Function
plot_relative_performance_from_wide
Compute relative performance vs ref_method and save plot + CSV. ``bdf`` may contain multiple rows per ``n_hidden_states`` (one per run); when
benchmarking/plot-triton-bench.py:433
↓ 1 callers
Function
plot_roofline
Classic roofline plot: achieved TFLOP/s vs arithmetic intensity (FLOP/byte).
benchmarking/plot-triton-bench.py:345
↓ 1 callers
Function
plot_speedups
( results_dir: Path, imgs_dir: Path, max_concurrency: int, fmms_name: str, fmt: str = "png" )
benchmarking/vllm/plot_tpot.py:223
↓ 1 callers
Function
plot_strips
( df: pd.DataFrame, results_dir: Path, imgs_dir: Path, fmms_name: str, fmt: str = "png" )
benchmarking/vllm/plot_tpot.py:261
↓ 1 callers
Function
plot_tp_scaling
( long: pd.DataFrame, h_values: list[int], providers: list[str], )
benchmarking/plot_tp_scaling.py:77
↓ 1 callers
Function
plot_tpots
( df: pd.DataFrame, results_dir: Path, imgs_dir: Path, fmms_name: str, fmt: str = "png" )
benchmarking/vllm/plot_tpot.py:177
↓ 1 callers
Function
print_breakdown
Print per-scope runtime breakdown as percentages of kernel time. Raises if any expected scope is missing, since filling 0 would produce a bog
benchmarking/parse_proton_intrakernel.py:74
↓ 1 callers
Function
print_once
(msg: str)
src/fused_mm_sampling/core.py:109
↓ 1 callers
Function
print_per_run
(results_dir: Path, variant_key: str)
benchmarking/vllm/collect_results.py:102
↓ 1 callers
Function
print_results
Print per-variant accuracy with bootstrap CIs, and pairwise comparisons.
benchmarking/vllm/judge_eval.py:70
↓ 1 callers
Function
print_summary
(results_dir: Path)
benchmarking/vllm/collect_results.py:39
↓ 1 callers
Function
proton_context
()
src/fused_mm_sampling/persistent_matmul.py:714
↓ 1 callers
Function
read_metadata
Read metadata.json dumped by the benchmark runner. Falls back to args.json and logs.txt for older result directories.
benchmarking/plot-triton-bench.py:73
↓ 1 callers
Function
reference_top_k_top_p
Return the set of token indices allowed after top-k then top-p filtering.
tests/test_core.py:181
↓ 1 callers
Function
run_cupti
Run benchmarks using FlashInfer's CUPTI-based bench_gpu_time.
src/fused_mm_sampling/bench/speed_test.py:207
↓ 1 callers
Function
run_nvbench
Run benchmarks using NVBench.
src/fused_mm_sampling/bench/speed_test.py:158
↓ 1 callers
Function
run_own_benchmark
(args: Args)
src/fused_mm_sampling/bench/speed_test.py:250
↓ 1 callers
Function
run_proton_profile
(args: Args)
benchmarking/proton_profile.py:58
↓ 1 callers
Function
sample_compiled
(*args, seed: int | None = None, **kwargs)
src/fused_mm_sampling/core.py:160
↓ 1 callers
Function
save_csv
(df: pd.DataFrame, path: Path)
benchmarking/plot_bsz_sweep_runtime.py:96
↓ 1 callers
Function
shift_logits_negative
Shift all logits by -offset without touching the existing weights. Appends a bias column so that ``h_new @ W_new^T = h @ W^T - offset``. Sinc
src/fused_mm_sampling/testing.py:211
↓ 1 callers
Function
show_profile
(precision, profile_name)
src/fused_mm_sampling/persistent_matmul.py:820
↓ 1 callers
Function
summarize
(runs: list[BenchRun])
benchmarking/vllm/parse_engine_stats.py:98
↓ 1 callers
Function
supports_ws
()
src/fused_mm_sampling/persistent_matmul.py:47
← previous
next →
101–200 of 315, ranked by callers