Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6636e69
cuda: a one-shot RoCE all-gather for two ranks (roce.zig, roce_gather…
BobClawblaw Oct 14, 2026
39de039
lane core and native CUDA host for two-rank families with a vision to…
BobClawblaw Oct 14, 2026
bdc47c8
Merge branch 'pr/roce-gather' into pr/glm-flash-cuda
BobClawblaw Oct 14, 2026
cbe08cf
GLM-5.3-Flash on two CUDA ranks: the native family (zig/src/families/…
BobClawblaw Oct 14, 2026
a76f16a
glm kernels: the tensor-core fragment header beside them (qmm_frag.cu…
BobClawblaw Oct 14, 2026
abb8bbe
glm: the three Flash Next kernels the family loads (experts, experts_…
BobClawblaw Oct 14, 2026
2903dd7
cuda abi: the driver entries the GLM family uses (module function enu…
BobClawblaw Oct 14, 2026
87ef757
tf-cuda-test glm-*: exit right after the pass or summary line (the te…
BobClawblaw Oct 14, 2026
a759ccd
Merge branch 'pr/roce-gather' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
db750c4
Merge branch 'pr/lane-host-vision' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
a2eefa2
glm cuda: zig fmt
BobClawblaw Oct 15, 2026
22d92e4
lane host: a warm pass that steps aside is not launched after its can…
BobClawblaw Oct 15, 2026
a76651a
glm cuda: comments one line each, files under 600 lines, the long hea…
BobClawblaw Oct 15, 2026
ef73ec3
tf_video: the includes back under its one-line header
BobClawblaw Oct 15, 2026
e0d3baa
Merge branch 'pr/lane-host-vision' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
0e50498
cuda: RoCE gather comments on one line each, the protocol notes in do…
BobClawblaw Oct 15, 2026
cc5d9d1
vision inputs: a server without --vision refuses image parts in the f…
BobClawblaw Oct 15, 2026
89c68c8
Merge branch 'pr/lane-host-vision' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
aaed024
qwen_image.formatSeconds: t * 10 rounded in integers, not f128, so te…
BobClawblaw Oct 15, 2026
2cc423f
Merge branch 'pr/lane-host-vision' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
9e6dfcd
lane host: a set-up job's kept entry stays pinned until its restore r…
BobClawblaw Oct 15, 2026
a8ea350
Merge remote-tracking branch 'fork/pr/lane-host-vision' into pr/glm-f…
BobClawblaw Oct 15, 2026
d069277
cuda: RoCE gather ranks agree one shard cap (each sends its max_bytes…
BobClawblaw Oct 15, 2026
22d2a30
Merge remote-tracking branch 'fork/pr/roce-gather' into pr/glm-flash-…
BobClawblaw Oct 15, 2026
b07b11b
glm cuda: the review's four fixes: a RoCE check after every sync that…
BobClawblaw Oct 15, 2026
52b82fc
prompt cache: an entry removed while pinned is dead to lookups and fr…
BobClawblaw Oct 15, 2026
468fa88
Merge branch 'pr/lane-host-vision' into pr/glm-flash-cuda
BobClawblaw Oct 15, 2026
c525ea9
glm cuda: the gather check and the agreed settings' doc comments on o…
BobClawblaw Oct 15, 2026
7c9d845
Merge remote-tracking branch 'origin/main' into pr/roce-gather
BobClawblaw Oct 16, 2026
b8d45de
cuda: the RoCE gather joins tp_group: its setup crosses the group's N…
BobClawblaw Oct 16, 2026
bb7e2a2
Merge origin/main (1.0.12) into pr/lane-host-vision: main's image pat…
BobClawblaw Oct 16, 2026
b416ec8
lane core: several queued prompts in one pass for a backend with pref…
BobClawblaw Oct 16, 2026
1ac97f6
Merge remote-tracking branch 'fork/pr/roce-gather' into tmp-855-base
BobClawblaw Oct 16, 2026
b982a3b
Merge #853 and #852 (both on main 1.0.12 with #804) into pr/glm-flash…
BobClawblaw Oct 16, 2026
aa9d4a7
glm cuda: the ranks' communicator is a tp_group.Group; on two ranks t…
BobClawblaw Oct 16, 2026
653bd37
glm cuda: EXL3 routed experts (Mia-AiLab's checkpoint: 4-bit mcg trel…
BobClawblaw Oct 16, 2026
8278074
kernel contract: glm_exl3's eight launches with their sm_80/86/89/120…
BobClawblaw Oct 16, 2026
084c253
glm cuda: the ranks watch each other (tp_watch): a rank that fails or…
BobClawblaw Oct 16, 2026
b090a7b
glm cuda: verify windows to the decode buffers' 8 rows, so the lane c…
BobClawblaw Oct 16, 2026
93f5261
glm cuda: the image tower (model.visual.*, rank 0's) on cuBLASLt and …
BobClawblaw Oct 16, 2026
f9d4f9f
glm cuda: images on two ranks (--vision): rank 0's tower encodes a pr…
BobClawblaw Oct 16, 2026
3cc4581
tools/glm_vision_ref.py: the torch reference tf-cuda-test glm-vision …
BobClawblaw Oct 16, 2026
edc2285
glm cuda: the bf16 linears on glm_mm (ours, from the glm_cuda family)…
BobClawblaw Oct 16, 2026
875b695
glm cuda: TF_GLM_PROF=1 also times prompt chunks by section (gate, fo…
BobClawblaw Oct 16, 2026
526ffd4
Merge the glm_cuda family's head (c525ea99): its work now lives in fa…
BobClawblaw Oct 16, 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: 1 addition & 3 deletions tools/zig/lean_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
"zig/src/families/flashnext/roles_gen.zig",
"zig/kernels/metal/flashnext/sources_gen.zig",
)
# Third-party sources kept as their authors wrote them (stb_image.h) are skipped too.
VENDORED = "zig/vendor/"


def generator_output(path: Path) -> bool:
Expand All @@ -33,7 +31,7 @@ def generator_output(path: Path) -> bool:

def problems(path: Path) -> list[str]:
"""Every rule break in one file, as 'path:line: reason'."""
if generator_output(path) or path.relative_to(ROOT).as_posix().startswith(VENDORED):
if generator_output(path):
return []
lines = path.read_text(errors="replace").splitlines()
rel, found = path.relative_to(ROOT), []
Expand Down
7 changes: 2 additions & 5 deletions zig/build/vision.zig
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//! The image-input module (vision/qwen_image.zig with stb_image), shared by the engine API and the CUDA test runner.
//! The image-input module (vision/qwen_image.zig), shared by the engine API and the CUDA test runner.
const std = @import("std");

pub fn module(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode) *std.Build.Module {
const m = b.createModule(.{ .root_source_file = b.path("zig/src/vision/qwen_image.zig"), .target = target, .optimize = optimize, .link_libc = true });
m.addCSourceFile(.{ .file = b.path("zig/vendor/stb/stb_image_impl.c"), .flags = &.{ "-std=c11", "-O2" } });
m.addIncludePath(b.path("zig/vendor/stb"));
return m;
return b.createModule(.{ .root_source_file = b.path("zig/src/vision/qwen_image.zig"), .target = target, .optimize = optimize, .link_libc = true });
}
5 changes: 3 additions & 2 deletions zig/src/core/lane_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ pub const LaneHost = struct {
const e = job.entry orelse return;
job.entry = null;
const store = job.host.cache orelse return;
store.unpin(e);
if (!job.started) return;
job.stream.reuse.saved = null; // the backend restores before its first chunk; a later keep may free it
if (job.stream.reuse_failed) store.resumed(e, job.request.prompt, false) else if (job.stream.cached == e.at) store.resumed(e, job.request.prompt, true);
Expand Down Expand Up @@ -316,9 +317,8 @@ pub const LaneHost = struct {
return false;
}
var reuse: lanes.stream.Reuse = .{};
// the entry stays alive until the backend restores it: nothing keeps between here and this stream's own pass
if (h.cache) |store| if (r.prompt_logprobs == null and !r.untaught) if (store.lookupRewind(h.gpa, r.prompt, born(r), r.history_len, r.rewind_len, r.shared_prefixes, r.chunks, h.spans(r))) |l| {
job.entry = l.entry;
job.entry = if (l.entry) |e| store.pin(e) else null; // kept alive until its restore reports
job.kept0 = store.counts.kept;
job.marks = l.marks;
reuse = .{ .saved = if (l.entry) |e| e.saved else null, .at = if (l.entry) |e| e.at else 0, .marks = l.marks, .hook = .{ .ptr = job, .at = Job.kept } };
Expand Down Expand Up @@ -474,6 +474,7 @@ pub const LaneHost = struct {
job.proposer.deinit();
job.started = false;
job.fill_began = false;
if (job.entry) |e| h.cache.?.unpin(e);
job.entry = null; // looked up again at its next admission
h.gpa.free(job.marks);
job.marks = &.{};
Expand Down
2 changes: 0 additions & 2 deletions zig/src/core/lanes/backend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,6 @@ pub const Backend = struct {
prompt_rows: bool = false,
/// The stream left the rounds: free its caches and held drafts.
release: *const fn (ptr: *anyopaque, s: *Stream) void,
/// After a failed round: the streams whose caches could not grow, ended alone; 0 when the round failed.
refused: ?*const fn (ptr: *anyopaque, out: []*Stream) usize = null,
};

pub fn prefill(b: Backend, s: *Stream) !void {
Expand Down
6 changes: 0 additions & 6 deletions zig/src/core/lanes/engine.zig
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ pub const Engine = struct {
return false;
}

/// After ``step`` failed: the streams the backend refused alone (the caller ends them; the rest go on).
pub fn refused(e: *Engine, out: []*Stream) usize {
const ask = e.backend.vtable.refused orelse return 0;
return ask(e.backend.ptr, out);
}

/// Release a cancelled stream between rounds: no pending draws or drafts.
pub fn discard(e: *Engine, s: *Stream) void {
s.finished = true;
Expand Down
8 changes: 0 additions & 8 deletions zig/src/core/lanes/fake.zig
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,6 @@ pub const Fake = struct {
return self(ptr).drawn.items[handle];
}

fn refusedFn(ptr: *anyopaque, out: []*Stream) usize {
const x = self(ptr);
const n = @min(out.len, x.refused.items.len);
@memcpy(out[0..n], x.refused.items[0..n]);
x.refused.clearRetainingCapacity();
return n;
}

fn verify(ptr: *anyopaque, windows: []const be.Window, out: []be.Verified) anyerror!void {
const x = self(ptr);
x.rounds += 1;
Expand Down
19 changes: 15 additions & 4 deletions zig/src/core/prompt_cache.zig
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ pub const Entry = struct {
last: []u32, // the last prompt that kept or resumed it
shared: bool = false, // kept at a shared system block's cut: other conversations resume it, so its own never supersedes it
branched: bool = false, // resumed again after a later prompt kept a longer state extending it: never superseded
pins: u32 = 0, // admitted jobs that restore it and have not yet: eviction passes it over
};

pub const Counts = struct { hits: u64 = 0, misses: u64 = 0, kept: u64 = 0, evicted: u64 = 0, refused: u64 = 0, failed: u64 = 0 };
Expand Down Expand Up @@ -161,6 +162,16 @@ pub const Store = struct {
s.free(e);
}

/// `e` waits for a restore: no lookup or keep evicts it until `unpin` (jobs set up after it run their own first).
pub fn pin(_: *Store, e: *Entry) *Entry {
e.pins += 1;
return e;
}

pub fn unpin(_: *Store, e: *Entry) void {
e.pins -= 1;
}

/// The family's free storage kept for later saves.
pub fn spare(s: *const Store) u64 {
return if (s.family.vtable.spare) |f| f(s.family.ptr) else 0;
Expand Down Expand Up @@ -450,7 +461,7 @@ pub const Store = struct {
if (s.family.vtable.trim) |f| f(s.family.ptr, s.budget -| s.held -| bytes); // spare that cannot take this state goes before any state
if (s.spare() < free_) continue;
}
s.remove(s.victimBut(null, prompt, born).?); // its storage may come back spare and take this state
s.remove(s.victimBut(null, prompt, born) orelse return s.fail(at, error.RestoresPending)); // spare for this state
s.counts.evicted += 1;
}
if (s.entries.items.len == 0) if (s.family.vtable.trim) |f| f(s.family.ptr, s.budget -| bytes);
Expand Down Expand Up @@ -534,17 +545,17 @@ pub const Store = struct {
return false;
}

/// The entry to free first, never `skip`: a superseded one, no branch point, oldest; else the oldest, rewind last.
/// The entry to free first, never `skip` or pinned: superseded, no branch point, oldest; else oldest, rewind last.
fn victimBut(s: *const Store, skip: ?*Entry, prompt: []const u32, born: u32) ?usize {
var best: ?usize = null;
for (s.entries.items, 0..) |e, i| {
if (e.shared or e.branched or e == skip or s.isActiveRewind(e, prompt)) continue; // shared cuts and branch points go only as the least recently used
if (e.shared or e.branched or e == skip or e.pins > 0 or s.isActiveRewind(e, prompt)) continue; // shared cuts and branch points go only as the least recently used
const now = born > e.born and prompt.len > e.tokens.len and std.mem.eql(u32, prompt[0..e.tokens.len], e.tokens); // a longer request's tokens extend it
if ((now or s.extended(e)) and (best == null or e.used < s.entries.items[best.?].used)) best = i;
}
if (best) |i| return i;
var oldest: ?usize = null;
for (s.entries.items, 0..) |e, i| if (e != skip and (oldest == null or s.before(e, s.entries.items[oldest.?], prompt))) {
for (s.entries.items, 0..) |e, i| if (e != skip and e.pins == 0 and (oldest == null or s.before(e, s.entries.items[oldest.?], prompt))) {
oldest = i;
};
return oldest;
Expand Down
30 changes: 30 additions & 0 deletions zig/src/core/prompt_cache_test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,33 @@ test "a kept state grows only into what the budget leaves, and evicts nothing to
var stranger: u8 = 0;
try std.testing.expect(!s.grow(&stranger, 0)); // a state the store doesn't hold
}

test "an entry pinned for a restore still to come outlives the lookups set up after it; unpinned, it goes again" {
const gpa = std.testing.allocator;
var arena: std.heap.ArenaAllocator = .init(gpa);
defer arena.deinit();
const a = arena.allocator();
var f: Fake = .{ .gpa = gpa };
var s = Store.init(gpa, f.snapshots(), .{ .min_prompt = 0 }, 220); // fake bytes: 100 + at
defer s.deinit();
const x = [_]u32{ 5, 5, 5, 5 };
_ = f.pass(&s, &x, try s.begin(a, &x, 3, &.{}, &.{}, null, &.{})); // 103 bytes, the oldest
const y = [_]u32{ 6, 6, 6, 6 };
_ = f.pass(&s, &y, try s.begin(a, &y, 3, &.{}, &.{}, null, &.{})); // 103: 206 held
const xa = [_]u32{ 5, 5, 5, 5, 9 };
const l = try s.lookup(a, &xa, 3, &.{}, &.{}, &.{}); // a job set up to resume x
const e = l.entry.?;
_ = s.pin(e);
const z = [_]u32{ 7, 7, 7, 7, 7, 7, 7, 7 };
_ = try s.lookup(a, &z, 7, &.{}, &.{}, &.{}); // the next job's room: y goes, not x
try std.testing.expect(s.find(&xa, &.{}, &.{}) == e);
try std.testing.expect(s.find(&.{ 6, 6, 6, 6 }, &.{}, &.{}) == null);
const w: [130]u32 = @splat(8);
_ = try s.lookup(a, &w, 120, &.{}, &.{}, &.{}); // 220 bytes, and nothing but x to evict: it stays
try std.testing.expect(!s.keep(&w, 120, null, &.{}, &.{})); // and a keep with no room is refused
try std.testing.expect(s.find(&xa, &.{}, &.{}) == e);
s.unpin(e);
_ = try s.lookup(a, &w, 120, &.{}, &.{}, &.{});
try std.testing.expect(s.find(&xa, &.{}, &.{}) == null);
try std.testing.expectEqual(s.entries.items.len, f.live);
}
6 changes: 0 additions & 6 deletions zig/src/native/cuda_bound.zig
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,6 @@ pub fn vtable(comptime H: type, v: be.Backend.VTable) be.Backend.VTable {
return x.inner.vtable.held.?(x.inner.ptr, s, out);
}
}.f else null,
.refused = if (v.refused != null) struct {
fn f(p: *anyopaque, out: []*lanes.Stream) usize {
const x = H.bind(p);
return x.inner.vtable.refused.?(x.inner.ptr, out);
}
}.f else null,
.prompt_rows = v.prompt_rows,
.release = struct {
fn f(p: *anyopaque, s: *lanes.Stream) void {
Expand Down
1 change: 1 addition & 0 deletions zig/src/server/vision_inputs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub fn extract(srv: *Server, cx: *Cx, messages: ?Value) errors.Refused!?Extracte
var img = qi.decode(cx.a, bytes, .{}) catch |e| switch (e) {
error.OutOfMemory => return error.OutOfMemory,
error.ImageTooLarge => return cx.refuse("image dimensions exceed the decoded pixel limit"),
error.NoDecoder => return cx.refuse("image inputs need the shared JPEG and PNG decoder, which this server does not have yet"),
else => return cx.refuse("image bytes are invalid or unsupported; use JPEG or PNG"),
};
total_pixels += @as(u64, img.w) * img.h;
Expand Down
108 changes: 4 additions & 104 deletions zig/src/vision/qwen_image.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ const std = @import("std");
/// GLM-5.3-Flash's preparation (its canvas, padding, normalization and patch order) on this module's decode and resize.
pub const glm = @import("glm_image.zig");

extern fn stbi_info_from_memory(buffer: [*]const u8, len: c_int, x: *c_int, y: *c_int, comp: *c_int) c_int;
extern fn stbi_load_from_memory(buffer: [*]const u8, len: c_int, x: *c_int, y: *c_int, comp: *c_int, req: c_int) ?[*]u8;
extern fn stbi_image_free(p: ?*anyopaque) void;

pub const Limits = struct {
max_dimension: u32 = 8192,
max_pixels: u64 = 16 * 1024 * 1024,
Expand All @@ -24,108 +20,12 @@ pub const Image = struct {
}
};

pub const Error = error{ UnsupportedImage, ImageTooLarge, OutOfMemory, BadAspectRatio };
pub const Error = error{ UnsupportedImage, ImageTooLarge, OutOfMemory, BadAspectRatio, NoDecoder };

/// JPEG or PNG bytes to RGB: EXIF orientation applied (JPEG), any alpha composited over white.
/// JPEG or PNG bytes to RGB: the shared runtime decoder's job (pinned libjpeg-turbo); until it lands, refused by name.
pub fn decode(gpa: std.mem.Allocator, bytes: []const u8, limits: Limits) Error!Image {
if (bytes.len == 0 or bytes.len > std.math.maxInt(c_int)) return error.UnsupportedImage;
var w: c_int = 0;
var h: c_int = 0;
var comp: c_int = 0;
if (stbi_info_from_memory(bytes.ptr, @intCast(bytes.len), &w, &h, &comp) == 0) return error.UnsupportedImage;
if (w <= 0 or h <= 0 or w > limits.max_dimension or h > limits.max_dimension or
@as(u64, @intCast(w)) * @as(u64, @intCast(h)) > limits.max_pixels) return error.ImageTooLarge;
const alpha = comp == 2 or comp == 4;
const want: c_int = if (alpha) 4 else 3;
var got: c_int = 0;
const px = stbi_load_from_memory(bytes.ptr, @intCast(bytes.len), &w, &h, &comp, want) orelse return error.UnsupportedImage;
defer stbi_image_free(px);
const n: usize = @intCast(w * h);
_ = &got;
var rgb = try gpa.alloc(u8, n * 3);
errdefer gpa.free(rgb);
if (alpha) {
// PIL's paste of RGBA onto white with the alpha as mask: out = white + (src - white) * a / 255, rounded
for (0..n) |i| {
const a: i32 = px[i * 4 + 3];
for (0..3) |c| {
const s: i32 = px[i * 4 + c];
const t: i32 = (s - 255) * a + 128;
rgb[i * 3 + c] = @intCast(255 + ((t + (t >> 8)) >> 8));
}
}
} else @memcpy(rgb, px[0 .. n * 3]);
var im: Image = .{ .w = @intCast(w), .h = @intCast(h), .rgb = rgb };
const o = orientation(bytes);
if (o > 1) {
const t = try transpose(gpa, im, o);
im.deinit(gpa);
im = t;
}
return im;
}

/// A JPEG's EXIF orientation (1-8; 1 when absent or not a JPEG).
fn orientation(b: []const u8) u16 {
if (b.len < 4 or b[0] != 0xFF or b[1] != 0xD8) return 1;
var i: usize = 2;
while (i + 4 <= b.len and b[i] == 0xFF) {
const marker = b[i + 1];
const len = (@as(usize, b[i + 2]) << 8) | b[i + 3];
if (marker == 0xDA or len < 2 or i + 2 + len > b.len) break;
if (marker == 0xE1 and len >= 16 and std.mem.eql(u8, b[i + 4 .. i + 10], "Exif\x00\x00")) {
const t = b[i + 10 .. i + 2 + len];
const le = t[0] == 'I';
const rd16 = struct {
fn f(x: []const u8, at: usize, little: bool) u16 {
return if (little) std.mem.readInt(u16, x[at..][0..2], .little) else std.mem.readInt(u16, x[at..][0..2], .big);
}
}.f;
const rd32 = struct {
fn f(x: []const u8, at: usize, little: bool) u32 {
return if (little) std.mem.readInt(u32, x[at..][0..4], .little) else std.mem.readInt(u32, x[at..][0..4], .big);
}
}.f;
if (t.len < 8) return 1;
const ifd = rd32(t, 4, le);
if (ifd + 2 > t.len) return 1;
const count = rd16(t, ifd, le);
for (0..count) |e| {
const at = ifd + 2 + e * 12;
if (at + 12 > t.len) return 1;
if (rd16(t, at, le) == 0x0112) {
const v = rd16(t, at + 8, le);
return if (v >= 1 and v <= 8) v else 1;
}
}
return 1;
}
i += 2 + len;
}
return 1;
}

/// PIL's exif_transpose for orientations 2-8.
fn transpose(gpa: std.mem.Allocator, im: Image, o: u16) Error!Image {
const swap = o >= 5;
const W: u32 = if (swap) im.h else im.w;
const H: u32 = if (swap) im.w else im.h;
const out = try gpa.alloc(u8, im.rgb.len);
for (0..H) |y| for (0..W) |x| {
// the source pixel of output (x, y)
const sx: u32, const sy: u32 = switch (o) {
2 => .{ im.w - 1 - @as(u32, @intCast(x)), @intCast(y) },
3 => .{ im.w - 1 - @as(u32, @intCast(x)), im.h - 1 - @as(u32, @intCast(y)) },
4 => .{ @intCast(x), im.h - 1 - @as(u32, @intCast(y)) },
5 => .{ @intCast(y), @intCast(x) },
6 => .{ @intCast(y), im.h - 1 - @as(u32, @intCast(x)) },
7 => .{ im.w - 1 - @as(u32, @intCast(y)), im.h - 1 - @as(u32, @intCast(x)) },
8 => .{ im.w - 1 - @as(u32, @intCast(y)), @intCast(x) },
else => .{ @intCast(x), @intCast(y) },
};
@memcpy(out[(y * W + x) * 3 ..][0..3], im.rgb[(sy * im.w + sx) * 3 ..][0..3]);
};
return .{ .w = W, .h = H, .rgb = out };
_ = .{ gpa, bytes, limits };
return error.NoDecoder;
}

/// Python's round(): halves to even.
Expand Down
3 changes: 0 additions & 3 deletions zig/vendor/stb/README.md

This file was deleted.

Loading
Loading