Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- Lanes: an optional normalized-row view of the prompt features, whose `null` default keeps every existing drafter path as it is (#4132, refs #2485). Thanks to @tacosta.

- App: only the owner token resolves a tool approval on the remote-control server (#3034).

- HIP: a routed prompt plan keeps the stacked shared expert whole up to the GEMM tile instead of cutting it into 8-row items, and on gfx1151 a prompt pass of 33 rows or more takes the GEMM tile for every expert; decode, lane rounds and the MTP draft head keep the 8-row tile, and outputs keep their bytes (#3521, fixes #3161). Thanks to @AbrahamCete.
Expand Down
9 changes: 9 additions & 0 deletions zig/src/core/lanes/backend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ pub const Features = struct {
pub const Space = enum { host, device };
pub const Dtype = enum { bf16, f16, f32, u32 };
pub const Fence = union(enum) { none, cuda_event: u64, metal_event: u64 };
/// A short-lived normalized row view; keep its bytes valid until reads are queued on the same ordered stream.
pub const Normalized = struct {
buffer: u64,
byte_offset: u64 = 0,
start: u64,
rows: u32,
row_bytes: u32,
};
buffer: u64, // a host pointer, or a device pointer on `device`
offset: u64 = 0, // bytes into `buffer` where the first row starts
rows: u32, // packed rows, row-major
Expand All @@ -43,6 +51,7 @@ pub const Features = struct {
device: i32 = 0, // the drafter must run on this device
dtype: Dtype,
ready: Fence = .none, // .none: written; else the fence to wait on before reading, kind naming the backend
normalized: ?Normalized = null, // optional already-normalized view of some or all rows in this request
};

/// Takes a prompt chunk's tapped rows, the first at position `start`, while they are still held.
Expand Down
Loading