Skip to content
Closed
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
4 changes: 3 additions & 1 deletion zig/src/families/glm/backend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const fwd = @import("forward.zig");
/// One stream's window and a shared forward's rows, ms on one M5 Ultra (a pair times its own at load: timing.zig).
const one_mac_window_costs = costTable(13.0, 4.1);
const one_mac_shared_costs = costTable(8.4 + 4.1, 4.1);
/// The acceptance estimates' rate, below the core's 0.15: a stream takes about twice the misses in a row to go plain.
const depth_rate = 0.08;

fn costTable(comptime one: f64, comptime row: f64) [st.max_rows]lanes.config.Cost {
var c: [st.max_rows]lanes.config.Cost = undefined;
Expand Down Expand Up @@ -61,7 +63,7 @@ pub const Backend = struct {
.drafts = 4,
.window_costs = if (b.costs) |*c| &c.window else if (b.sl.e.ep == null) &one_mac_window_costs else &.{},
.mtp_step_ms = if (b.costs) |c| c.head_ms else 1.3,
.depth_rate = if (b.costs != null) timing.depth_rate else 0,
.depth_rate = depth_rate,
.streams_exact = true,
.hidden_rows = true,
.batch_rows = st.max_rows,
Expand Down
2 changes: 0 additions & 2 deletions zig/src/families/glm/timing.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const room = 112;
const warm = 6;
/// Head chains of 1 and 8 levels: their difference over 7 is a level's ms.
const levels = [2]u32{ 1, 8 };
/// Depths priced at timed costs sit within a few percent: the acceptance estimates move slower so noise picks no depth.
pub const depth_rate = 0.08;

/// The depth rule's costs: timed now (both Macs time, rank 0 keeps them) or kept from an earlier load of this build.
pub fn measure(sl: *Slots, gpa: std.mem.Allocator, io: std.Io) !?Costs {
Expand Down
Loading