Skip to content
Merged
Changes from all commits
Commits
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
62 changes: 25 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,59 +25,47 @@ This project is now fully independent and does not aim to maintain backward comp

While the repository still resembles upstream in structure, major changes include:

### Modernized infrastructure
### Platform support

* Revamped CI
* Support for Python 3.10–3.13
* Support for macOS up to 15
* Significantly improved reliability (≥90% CI success on correct code)
* LLVM 22, ARM (aarch64) support

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is 'LLVM 22' a platform?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What section do you feel we should put it under? (or what name to give this one?)


### Structural improvements

* Added `dataclasses.dataclass` structs:
### CI

* Work with both ndarrays and fields
* Can be passed into child `ti.func` functions
* Can be nested
* No kernel runtime overhead (kernels see only underlying arrays)
* Kernel-level [code coverage](https://genesis-embodied-ai.github.io/quadrants/user_guide/kernel_coverage.html) — device-side branch coverage in standard `coverage.py` format, integrated with pytest-cov
* AI-driven checks for line wrapping, deleted comments, test coverage, and feature factorization

### Removed components
### Structural improvements

To focus the compiler and reduce maintenance burden, we removed:
* `dataclasses.dataclass` structs — work with ndarrays and fields, nestable, passable to `qd.func`, zero kernel-runtime overhead
* [`qd.Tensor`](https://genesis-embodied-ai.github.io/quadrants/user_guide/tensor.html) — unified API over fields and ndarrays with per-tensor layout control, pickle support, and a `backend=` switch
* [`BufferView`](https://genesis-embodied-ai.github.io/quadrants/user_guide/buffer_view.html) — safe sub-range ndarray access with bounds checking in debug mode

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my view we can consider adstack as being added in Quadrants, given how helpless was the original implementation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you propose a bullet point please

@duburcqa duburcqa May 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* [`AutoDiff with dynamic loops`](https://genesis-embodied-ai.github.io/quadrants/user_guide/autodiff.html#autodiff-with-dynamic-loops) — computes the gradient of any kernel transparently using reverse-mode differentiation and runtime-based memory allocation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I don't think it is a "### Structural improvements". Keeping the "### Autodiff" section is probably better.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can keep your description, mine, or a mix of both.


* GUI / GGUI
* C-API
* AOT
* DX11 / DX12
* iOS / Android
* OpenGL / GLES
* argpack
* CLI
### Removed components

### Performance improvements
To focus the compiler and reduce maintenance burden, we removed: GUI/GGUI, C-API, AOT, DX11/DX12, iOS/Android, OpenGL/GLES, argpack, CLI.

#### Reduced launch latency
### Performance

* Release 4.0.0 improved non-batched ndarray CPU performance by **4.5×** in Genesis benchmarks.
* Release 3.2.0 improved ndarray performance from **11× slower than fields** to **1.8× slower** (on a 5090 GPU, Genesis benchmark).
* **Reduced launch latency** — ndarray CPU performance improved **4.5×**; ndarray GPU performance went from 11× slower than fields to ~30% slower (5090 GPU, Genesis benchmark)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also compile faster now :p

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you write a proposed bullet point please

@duburcqa duburcqa May 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* **Faster compilation** — cold compilation of kernels is about 35% faster when `debug=False`

* **[Fastcache](https://genesis-embodied-ai.github.io/quadrants/user_guide/fastcache.html)** — opt-in source-level cache (`@qd.kernel(fastcache=True)`) that bypasses front-end AST parsing; reduces warm-cache kernel load from **7.2 s → 0.3 s** on Genesis benchmarks
* **[GPU Graphs](https://genesis-embodied-ai.github.io/quadrants/user_guide/graph.html)** — `@qd.kernel(graph=True)` captures kernel sequences into a graph; `qd.graph_do_while` runs GPU-side iteration loops (hardware conditional nodes on CUDA SM 9.0+)
* **[perf_dispatch](https://genesis-embodied-ai.github.io/quadrants/user_guide/perf_dispatch.html)** — auto-benchmarks multiple kernel implementations and selects the fastest at runtime
* **[Zero-copy interop](https://genesis-embodied-ai.github.io/quadrants/user_guide/interop.html)** — `to_torch(copy=False)` / `to_numpy(copy=False)` via DLPack on CUDA, CPU, AMDGPU, and Metal; direct torch tensor pass-through into kernels

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Correct zero-copy NumPy backend claim

This bullet states that both to_torch(copy=False) and to_numpy(copy=False) are available “on CUDA, CPU, AMDGPU, and Metal,” but docs/source/user_guide/interop.md explicitly documents that zero-copy to_numpy(copy=False) requires a CPU backend. As written, users on CUDA/AMDGPU/Metal are told a NumPy zero-copy path exists when it does not, which can lead to incorrect integration assumptions and runtime confusion.

Useful? React with 👍 / 👎.


#### Reduced warm-cache latency
### SIMT primitives

On Genesis simulator (Linux + NVIDIA 5090):
* **[Tile16x16](https://genesis-embodied-ai.github.io/quadrants/user_guide/tile16.html)** — register-resident 16×16 matrix tiles with Cholesky, triangular solve, and rank-1 updates; 5× faster than shared-memory baselines on blocked linear algebra
* **[Subgroup ops](https://genesis-embodied-ai.github.io/quadrants/user_guide/subgroup.html)** — cross-platform `shuffle`, `shuffle_down`, `reduce_add`, `reduce_all_add` across CUDA, AMDGPU, Metal and Vulkan

* `single_franka_envs.py` cache load time reduced from **7.2s → 0.3s**
### Autodiff

#### Zero-copy Torch interop
* [**Autodiff with dynamic loops**](https://genesis-embodied-ai.github.io/quadrants/user_guide/autodiff.html#autodiff-with-dynamic-loops) — computes the gradient of any kernel transparently using reverse-mode differentiation and runtime-based memory allocation
* Forward-mode AD, custom gradients (`@qd.ad.grad_replaced`), `qd.ad.Tape`

* Added `to_dlpack`
* Enables zero-copy memory sharing between PyTorch and Quadrants
* Avoids kernel-based accessors
* Significantly improves performance

### Compiler upgrades
### Debugging & development

* Upgraded to LLVM 22
* Enabled ARM support
* **[Python backend](https://genesis-embodied-ai.github.io/quadrants/user_guide/python_backend.html)** — `qd.init(qd.python)` interprets kernels as plain Python so they can be stepped through in a standard Python debugger

---

Expand Down
Loading