Files
project_6/muh/schema/scan.yaml
dylanyunlon 9b21a13119 [MUH] Bootstrap muh toolchain — extract/parse/gen_yaml/gen_patch + baseline.muh
Pipeline:
  1. extract.py: Parses all 26 CCCL tuning_*.cuh → 26 YAML schemas in muh/schema/
  2. parse.py: .muh file parser with extends-inheritance + schema validation
  3. gen_yaml.py: .muh → computility-run.yaml (verified: matches competition reference)
  4. gen_patch.py: .muh → vllm kernel unified diff patches (6 algorithm mappings)
  5. baseline.muh: Competition reference config, all tuning values pending BI-V100 benchmarks

Schemas extracted:
  26 algorithms, 8-19 params each, SM75/80/90/100 reference tunings
  Priority mapping: reduce→attention, topk→sampling, scan→paged_attention,
  transform→activations, batch_memcpy→KV_cache, for→RoPE

Tested: extract→parse→validate→gen_yaml→gen_patch full pipeline passes
2026-07-30 10:39:06 +00:00

256 lines
5.3 KiB
YAML

# muh schema for scan
# Auto-extracted from cub/cub/device/dispatch/tuning/tuning_scan.cuh
# Generated by muh/extract.py
algorithm: scan
source: cub/cub/device/dispatch/tuning/tuning_scan.cuh
parameters:
threads_per_block:
type: int
range:
- 32
- 1024
step: 32
items_per_thread:
type: int
range:
- 1
- 32
step: 1
load_algorithm:
type: enum
values:
- BLOCK_LOAD_DIRECT
- BLOCK_LOAD_VECTORIZE
- BLOCK_LOAD_TRANSPOSE
- BLOCK_LOAD_WARP_TRANSPOSE
- BLOCK_LOAD_WARP_TRANSPOSE_TIMESLICED
- BLOCK_LOAD_STRIPED
load_modifier:
type: enum
values:
- LOAD_DEFAULT
- LOAD_CA
- LOAD_CG
- LOAD_CS
- LOAD_CV
- LOAD_LDG
store_algorithm:
type: enum
values:
- BLOCK_STORE_DIRECT
- BLOCK_STORE_WARP_TRANSPOSE
- BLOCK_STORE_WARP_TRANSPOSE_TIMESLICED
- BLOCK_STORE_STRIPED
scan_algorithm:
type: enum
values:
- BLOCK_SCAN_RAKING
- BLOCK_SCAN_RAKING_MEMOIZE
- BLOCK_SCAN_WARP_SCANS
lookback_delay.kind:
type: enum
values:
- no_delay
- fixed_delay
- exponential_backoff
- exponential_backoff_jitter
- exponential_backoff_jitter_window
- exponential_backon_jitter_window
- exponential_backon_jitter
- exponential_backon
lookback_delay.delay:
type: int
range:
- 0
- 2000
step: 50
lookback_delay.l2_write_latency:
type: int
range:
- 0
- 2000
step: 50
reduce_and_scan_warps:
type: int
range:
- 1
- 8
step: 1
lookahead_items_per_thread:
type: int
range:
- 1
- 16
step: 1
lookahead_stages:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
block_idx_stages:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
delay_constructor:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
input_value_size:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
input_value_alignment:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
output_value_size:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
output_value_alignment:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
accum_size:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
accum_alignment:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
offset_size:
type: int
range:
- 1
- 1024
step: 1
note: unknown_range
reference_tunings:
sm75:
-
threads: 128
items: 7
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
sm80:
-
threads: 320
items: 14
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 352
items: 16
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 320
items: 12
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 288
items: 22
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 288
items: 8
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 384
items: 12
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
-
threads: 640
items: 24
load_algorithm: BLOCK_LOAD_DIRECT
store_algorithm: BLOCK_STORE_DIRECT
sm90:
sm100:
-
items: 18
threads: 512
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
-
items: 14
threads: 384
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_CA
-
items: 13
threads: 512
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
-
items: 13
threads: 288
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_CA
-
items: 22
threads: 384
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
-
items: 19
threads: 416
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_CA
-
items: 23
threads: 416
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
-
items: 22
threads: 320
load_algorithm: BLOCK_LOAD_WARP_TRANSPOSE
store_algorithm: BLOCK_STORE_WARP_TRANSPOSE
load_modifier: LOAD_DEFAULT
bi_v100:
status: pending_benchmark
note: Run muh benchmark on Iluvatar BI-V100 to fill these values
threads_per_block: TBD
items_per_thread: TBD