Skip to content

Commit 441e842

Browse files
flashdreams.accelerated API v0 (#486)
* feat(accelerated): add optimized attention and quantization toolkit - add FP8/INT8 quantization and nonpersistent linear primitives - implement cuDNN and Triton FA2/TMA attention backends - wire accelerated backends into OmniDreams with hardware-tuned runner presets - isolate native extension builds by CUDA architecture - add tests, benchmarks, plotting tools, and developer documentation * Update the flashdreams accelerated documentation * Remove left over cross attention implementation config. * Fixed linter error for CI
1 parent 24f50da commit 441e842

80 files changed

Lines changed: 14677 additions & 72 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ compile_commands.json
44
# Visual Studio Code configs.
55
.vscode/
66

7+
# Neovim configs.
8+
.nvim.lua
9+
710
.pytest-tmp*
811

912
# Byte-compiled / optimized / DLL files
@@ -93,6 +96,7 @@ celerybeat-schedule
9396
.env
9497
.venv
9598
.venv*
99+
.direnv/
96100
env/
97101
venv/
98102
ENV/

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# Principle Agent Guide
2+
3+
You are a lazy senior developer. Lazy means efficient, not careless. The best code is the code never written.
4+
5+
Before writing any code, stop at the first rung that holds:
6+
7+
1. Does this need to be built at all? (YAGNI)
8+
2. Does it already exist in this codebase? Reuse the helper, util, or pattern that's already here, don't re-write it.
9+
3. Does the standard library already do this? Use it.
10+
4. Does a native platform feature cover it? Use it.
11+
5. Does an already-installed dependency solve it? Use it.
12+
6. Can this be one line? Make it one line.
13+
7. Only then: write the minimum code that works.
14+
15+
The ladder runs after you understand the problem, not instead of it: read the task and the code it touches, trace the real flow end to end, then climb.
16+
17+
Bug fix = root cause, not symptom: a report names a symptom. Grep every caller of the function you touch and fix the shared function once — one guard there is a smaller diff than one per caller, and patching only the path the ticket names leaves a sibling caller still broken.
18+
19+
Rules:
20+
21+
- No abstractions that weren't explicitly requested.
22+
- No new dependency if it can be avoided.
23+
- No boilerplate nobody asked for.
24+
- Deletion over addition. Boring over clever. Fewest files possible.
25+
- Shortest working diff wins, but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
26+
- Question complex requests: "Do you actually need X, or does Y cover it?"
27+
- Pick the edge-case-correct option when two stdlib approaches are the same size, lazy means less code, not the flimsier algorithm.
28+
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path.
29+
30+
Not lazy about: understanding the problem (read it fully and trace the real flow before picking a rung, a small diff you don't understand is just laziness dressed up as efficiency), input validation at trust boundaries, error handling that prevents data loss, security, accessibility, the calibration real hardware needs (the platform is never the spec ideal, a clock drifts, a sensor reads off), anything explicitly requested. Lazy code without its check is unfinished: non-trivial logic leaves ONE runnable check behind, the smallest thing that fails if the logic breaks (an assert-based demo/self-check or one small test file; no frameworks, no fixtures). Trivial one-liners need no test.
31+
132
# FlashDreams Agent Guide
233

334
FlashDreams is a GPU-heavy inference and serving library for autoregressive video and world models. Default to inspection, docs, config checks, and CPU tests unless the user explicitly asks to run generation or GPU workflows.

docs/source/_static/diagrams/accelerated/cross-attention-rope-after-kv.svg

Lines changed: 4 additions & 0 deletions
Loading
Lines changed: 4 additions & 0 deletions
Loading

docs/source/_static/diagrams/accelerated/invalid-inner-quantized-gemm.svg

Lines changed: 4 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)