Skip to content
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4d088bf
dasLLAMA: extract disk->compute layout transforms into dasllama_layout
borisbat Jul 26, 2026
b77307d
dasLLAMA: daspkg release manifest for lcpp_bench (dasllama-bench bundle)
borisbat Jul 26, 2026
2ec0698
dasLLAMA vulkan tier: size the stream-slot reserve from the model, no…
borisbat Jul 26, 2026
2d5fac4
dasLLAMA tuner: gate failures record the reference body, and stop del…
borisbat Jul 26, 2026
d3a5869
dasLLAMA tuner: q51 probe resolves per-variant mr off the layout comp…
borisbat Jul 26, 2026
f6b8289
dasLLAMA: consolidate plane-stride truth into dasllama_gemm_schema
borisbat Jul 26, 2026
9161afb
dasLLAMA vulkan tier: the fastest GEMM path is the default
borisbat Jul 26, 2026
e14d5e4
dasLLAMA bench: -m accepts a comma-separated model list
borisbat Jul 26, 2026
e2b8186
llvm -exe: route das main through a catch boundary — panics print and…
borisbat Jul 26, 2026
4a22f62
dasLLAMA: q8n groundwork — the cm2 twin's format, device mode, gather…
borisbat Jul 26, 2026
352cf62
dasLLAMA: the cm2 twin - decode-in-load prefill GEMM + q8n GEMV on th…
borisbat Jul 26, 2026
d5f756a
dasLLAMA: the cm2 arena - the resident driver rides q8n planes and th…
borisbat Jul 26, 2026
0f50418
dasLLAMA vulkan tier: memory-priority residency shield (phase 4 wiring)
borisbat Jul 26, 2026
1eaecc9
dasLLAMA vulkan tier: streamed copies ride a dedicated transfer queue…
borisbat Jul 26, 2026
d1d9ed1
dasLLAMA vulkan tier: heat cache serves mixed expert triples, skip lo…
borisbat Jul 26, 2026
77e3c22
dasLLAMA: the vulkan-flavor .dlim - bake the GPU walk's gathers, slic…
borisbat Jul 27, 2026
593db10
dasLLAMA: big gguf loads refuse the interpreter; repack verified nati…
borisbat Jul 27, 2026
2db4a43
dasLLAMA: scope the parsed GGUF metadata (and tokenizer temps) with v…
borisbat Jul 27, 2026
bf5f668
CLAUDE.md: var inscope serves plain arrays/structs, not just smart_ptr
borisbat Jul 27, 2026
15f3192
dasLLAMA: glm4moe NextN head, narrow-batch attention threading, conve…
borisbat Jul 27, 2026
5ed34ad
dasLLAMA bench: real argv+env on the card, declarative A/B levers, --…
borisbat Jul 27, 2026
20fa4bb
mcp supervisor: newest-wins binary pick, and child noise is never a J…
borisbat Jul 27, 2026
4d8f0ad
dasLLAMA vulkan: decode-tail fusions — ar+requant and qk-norm+rope, o…
borisbat Jul 27, 2026
2fc32d4
dasLLAMA vulkan: K-quant decode GEMV to one-lane-per-block uint4 loads
borisbat Jul 27, 2026
d725e82
dasLLAMA vulkan: DASLLAMA_MM_SMALLD — the k/v grid-starvation A/B ins…
borisbat Jul 27, 2026
e8c67c2
dasLLAMA vulkan: bank the k/v tile verdict next to the knob
borisbat Jul 27, 2026
bc9249d
Merge remote-tracking branch 'origin/master' into bbatkin/dasllama-cm…
borisbat Jul 27, 2026
49c5fa0
dasLLAMA: bring the arc under master's hot-path lint and env registry
borisbat Jul 27, 2026
d1df409
dasLLAMA: Copilot round 1 — flag semantics, a per-model leak, and -m …
borisbat Jul 27, 2026
f19db6a
dasLLAMA: scope the cm2 test's scratch arrays
borisbat Jul 27, 2026
ff0ac1c
dasLLAMA: guard the baked-plane copy my LINT018 sweep unbalanced
borisbat Jul 27, 2026
e8e764f
Copilot round 3: validate the MCP pin, widen the bench's shell quoting
borisbat Jul 27, 2026
1f1ae14
dasLLAMA: PROBE_PATH's default was Windows-only
borisbat Jul 27, 2026
1f4f1aa
Copilot round 4: cap the whole supervisor error, file the knobs by area
borisbat Jul 27, 2026
fe1fc95
mcp supervisor: make the POSIX spawn honour the binary it reports
borisbat Jul 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ AST types (TypeDecl, Expression, Function, Structure, Enumeration, Variable, Mak

Quick rules:
- AST nodes have **unique ownership** — don't insert the same pointer into two parents; use `clone_type` / `clone_expression` / `clone_function` / `clone_variable` / `clone_structure` to duplicate.
- AST pointers use plain `=` and pass-by-value. **No `var inscope`, no `<-`** for them. `var inscope` is only for the residual smart_ptr types.
- AST pointers use plain `=` and pass-by-value. **No `var inscope`, no `<-`** for them. `var inscope` is for OWNED locals that should finalize at scope exit (smart_ptr types, plain arrays/structs) — never for gc_node AST pointers.
- Tools that build AST at runtime (outside the compile pipeline) must wrap their scope in `ast_gc_guard() { ... }` from `daslib/ast`, or the leak detector reports `GC APP LEAK` at exit.
- daslang has garbage collection, but plain `var arr : array<T>` does NOT finalize on scope exit. Either declare with `var inscope` (smart_ptr only), call `delete` explicitly, or move out via `<-`. Per-frame leaks in hot paths usually trace to a local `var arr` never deleted.
- daslang has garbage collection, but plain `var arr : array<T>` does NOT finalize on scope exit. Either declare with `var inscope` (finalize-at-scope-exit — serves plain arrays/structs as well as the smart_ptr types; Boris-confirmed + compile-verified 2026-07-26), call `delete` explicitly, or move out via `<-`. Per-frame leaks in hot paths usually trace to a local `var arr` never deleted.

Full migration table (when reading older docs that say `var inscope` or `<-` for AST types): **`skills/gc_migration.md`**.

Expand Down
2 changes: 1 addition & 1 deletion modules/dasLLAMA/.das_module
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ require daslib/fio
def initialize(project_path : string) {
let dasllama_paths = [
"dasllama_env", "dasllama_par", "dasllama_parity", "dasllama_tune", "dasllama_math", "dasllama_math_default", "dasllama_math_aarch64_neon", "dasllama_math_gen", "dasllama_math_metal", "dasllama_math_vulkan", "dasllama_math_accelerate", "dasllama_kernel_access", "dasllama_vulkan_lens", "dasllama_metal_lens", "dasllama_metal_common", "dasllama_metal_kernels", "dasllama_metal_prefill", "dasllama_metal_llama", "dasllama_gemm_gen", "dasllama_gemm_register", "dasllama_gemm_schema", "dasllama_quant", "dasllama_gguf",
"dasllama_unicode", "dasllama_tokenizer", "dasllama_bpe", "dasllama_common", "dasllama_prefix", "dasllama_audio", "dasllama_audio_io", "dasllama_whisper", "dasllama_qwen3a", "dasllama_parakeet", "dasllama_canary", "dasllama_gemma4a", "dasllama_vad", "dasllama_asr",
"dasllama_unicode", "dasllama_tokenizer", "dasllama_bpe", "dasllama_common", "dasllama_layout", "dasllama_prefix", "dasllama_audio", "dasllama_audio_io", "dasllama_whisper", "dasllama_qwen3a", "dasllama_parakeet", "dasllama_canary", "dasllama_gemma4a", "dasllama_vad", "dasllama_asr",
"dasllama_arch_llama", "dasllama_arch_qwen2", "dasllama_arch_qwen3", "dasllama_arch_phi3", "dasllama_arch_gemma2", "dasllama_arch_gemma3", "dasllama_arch_gemma4", "dasllama_arch_qwen2moe", "dasllama_arch_qwen3moe", "dasllama_arch_qwen35", "dasllama_arch_gptoss", "dasllama_arch_mistral3", "dasllama_arch_glm4moe", "dasllama_image",
"dasllama_transformer", "dasllama_chat", "dasllama"
]
Expand Down
8 changes: 8 additions & 0 deletions modules/dasLLAMA/ENVIRONMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Read by the inference engine itself, so these affect any program that loads a mo
| `DASLLAMA_GPU_COMBINE` | flag | on | Device-side routed MoE combine; 0 falls back to the host combine. |
| `DASLLAMA_GPU_HEAT` | number | 0 | Expert heat threshold: hold the N hottest experts resident regardless of layer placement. |
| `DASLLAMA_GPU_PROF` | flag | off | Report lifetime GPU queue submissions (real commands plus staging round-trips). |
| `DASLLAMA_CONV_PROF` | flag | off | Bucket gguf -> image conversion time by kind over the weight walk; one clock pair per tensor. |
| `DASLLAMA_ALLOW_INTERP_LOAD` | flag | off | Permit a big gguf load without -jit; the transforms run interpreted, so expect minutes per GB. |

## Metal backend

Expand Down Expand Up @@ -90,6 +92,10 @@ Vulkan GPU backend. Present only where the dasVulkan package is installed.
|---|---|---|---|
| `DASLLAMA_COOPMAT` | number | auto | Cooperative-matrix mode; the flash-attention twin needs it even when the GEMM runs sdot4. |
| `DASLLAMA_MM_SMALL` | number | 32 | Small-batch tier: 32 = sdot4 (default, beats both coopmat tiles below the crossover), 64 = coopmat M, 128 = always-L. |
| `DASLLAMA_MM_SMALLD` | number | 64 | Small-d cutoff routing narrow roles (k/v) to the small tier; widening measured worse, so this is an instrument. |
| `DASLLAMA_VK_FUSE` | flag | on | Fused decode tail (add+rms+requant, qk-norm+rope); 0 pins the split dispatches for a same-build A/B. |
| `DASLLAMA_VK_XFERQ` | flag | on | Stream expert uploads on the dedicated transfer queue, overlapped via a timeline semaphore; 0 keeps the single-queue rail. |
| `DASLLAMA_VK_MEMPRIO` | flag | on | Tag allocations high-priority (VK_EXT_memory_priority) so the driver demotes desktop memory, not ours. |
| `DASLLAMA_VK_FA` | flag | on | Vulkan flash-attention kernel; 0 falls back to the chunked path. |
| `DASLLAMA_VK_REBAR` | flag | on | Use a ReBAR device-local host-visible heap when one larger than 1GB is present. |
| `DASLLAMA_VK_HAZARD_PARANOID` | flag | off | Barrier at every dispatch (correctness bisect). |
Expand Down Expand Up @@ -134,6 +140,8 @@ Apple Accelerate / AMX float lane. `DASLLAMA_ACCEL` arms the whole group.

| Variable | Type | Default | Effect |
|---|---|---|---|
| `PROBE_PATH` | path | D:/_wcliff.bin | Scratch file the write-cliff probe writes; put it on the drive under test. |
Comment thread
borisbat marked this conversation as resolved.
Outdated
| `PROBE_GB` | number | 50 | Gigabytes the write-cliff probe writes before reporting. |
| `DASLLAMA_BENCH_MODEL` | text | tinyllama | Model name for the isolated GEMM bench. |
| `DASLLAMA_BENCH_NTOK` | number | unset | Token count for the isolated GEMM bench. |
| `DASLLAMA_BENCH_SKIP_ROWMAJOR` | flag | off | Skip the row-major arm of the isolated GEMM bench. |
Expand Down
1 change: 1 addition & 0 deletions modules/dasLLAMA/benchmarks/decode_step_trace.das
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ options _jit_fast_math = true // ggml-parity FP laxity — the CPU prefill/sam

require dasllama/dasllama_transformer // nolint:STYLE029 — umbrella fires each arch [init] registration; requiring dasllama_common directly would drop them
require dasllama/dasllama_math // setup_dasllama_jobque_ + pin_kernel_backend + parallel_argmax
require dasllama/dasllama_layout // convert_model_to_metal_blob — the blob-flavor transform
require ?das_metal dasllama/dasllama_metal_llama // nolint:STYLE030 — GPU driver half, Apple builds only
require daslib/jobque_boost
require daslib/clargs
Expand Down
Loading
Loading