From 203ccbd9c38a75ba43ccda05efab1cda0cc356e1 Mon Sep 17 00:00:00 2001 From: jel221 Date: Thu, 3 Dec 2026 09:02:18 -0800 Subject: [PATCH 1/2] fetch: icache stream prefetch from the L0 (VX_CFG_ICACHE_STREAM_ENABLE, default off) The L0's next-line prefetch comes back too late when its line misses the icache, so straight-line code larger than the icache waits on memory. With the knob on (it needs VX_CFG_ICACHE_L0_ENABLE), a slice also asks the icache for the line 4 past the one a fetch or a run enters, at the lowest priority on its request buffer, and drops the response. It runs only while recent prefetch responses came back late (two or more 16-cycle ticks, carried in the request tag); a line already wanted or one of the last two sent is not asked again. SimX models the same in fetch_l0(); a stream request in flight is counted in pending_ifetches_, so the core does not go quiescent before its response returns (dogfood had hung at test 20 without it). With the knob off the RTL is the L0's (Beacon: identical depth and LUTs, L0 on and off). model_parity: parity-l0-stream-{jacobi,dogfood,fw2}. --- VX_config.toml | 6 + ci/testcases/core.yaml | 15 +++ docs/designs/mlp_optimizations.md | 2 + .../icache_stream_prefetch_design_note.md | 14 +++ hw/rtl/VX_gpu_pkg.sv | 12 +- hw/rtl/core/VX_fetch.sv | 105 ++++++++++++++++-- sim/simx/constants.h | 7 ++ sim/simx/core.cpp | 76 ++++++++++++- 8 files changed, 219 insertions(+), 18 deletions(-) create mode 100644 docs/proposals/icache_stream_prefetch_design_note.md diff --git a/VX_config.toml b/VX_config.toml index 81ae01bba4..26b6dbdc07 100644 --- a/VX_config.toml +++ b/VX_config.toml @@ -279,6 +279,12 @@ VX_CFG_ICACHE_LATENCY = "expr: 2 + max(0, clog2($VX_CFG_ICACHE_SIZE) - clog2(163 # warps per slice that round trip bounds issue. Fixed-length fetch only (no C). VX_CFG_ICACHE_L0_ENABLE = false VX_CFG_ICACHE_L0_LINES = 4 +# Icache stream prefetch from the fetch L0: besides the next line for the L0, a +# slice asks the icache for the line 4 past the one a fetch or a run enters, and +# drops the response. It runs only while recent prefetch responses (the L0's and +# its own) come back late, i.e. miss the icache, so straight-line code larger +# than the icache streams in. Needs VX_CFG_ICACHE_L0_ENABLE. +VX_CFG_ICACHE_STREAM_ENABLE = false VX_CFG_DCACHE_SIZE = 16384 VX_CFG_DCACHE_NUM_WAYS = 4 diff --git a/ci/testcases/core.yaml b/ci/testcases/core.yaml index 0b379bdfcb..494394f96c 100644 --- a/ci/testcases/core.yaml +++ b/ci/testcases/core.yaml @@ -224,6 +224,21 @@ tests: app: vecadd args: -n4096 configs: -DVX_CFG_ICACHE_L0_ENABLE -DVX_CFG_VM_ENABLE +- id: parity-l0-stream-jacobi + check: model_parity + via: blackbox + app: jacobi + configs: -DVX_CFG_ICACHE_L0_ENABLE -DVX_CFG_ICACHE_STREAM_ENABLE -DVX_CFG_NUM_WARPS=2 -DVX_CFG_ICACHE_SIZE=4096 +- id: parity-l0-stream-dogfood + check: model_parity + via: blackbox + app: dogfood + configs: -DVX_CFG_ICACHE_L0_ENABLE -DVX_CFG_ICACHE_STREAM_ENABLE -DVX_CFG_NUM_WARPS=2 -DVX_CFG_ICACHE_SIZE=4096 +- id: parity-l0-stream-fw2 + check: model_parity + via: blackbox + app: jacobi + configs: -DVX_CFG_ICACHE_L0_ENABLE -DVX_CFG_ICACHE_STREAM_ENABLE -DVX_CFG_ICACHE_SIZE=4096 -DVX_CFG_ISSUE_WIDTH=2 -DVX_CFG_FETCH_WIDTH=2 -DVX_CFG_NUM_SFU_BLOCKS=2 # Softmax: elementwise exp + reduction (FPU + reduction traffic). - id: parity-softmax check: model_parity diff --git a/docs/designs/mlp_optimizations.md b/docs/designs/mlp_optimizations.md index 5b57b3487c..da14388ee3 100644 --- a/docs/designs/mlp_optimizations.md +++ b/docs/designs/mlp_optimizations.md @@ -77,6 +77,7 @@ Some of these features can be set with a `VX_CFG_*` knob (see [Build Configurati | CP DMA through the LLC | `VX_CFG_CP_LLC_CLIENT` | 1 (on). Takes effect only when one LLC serves every core. | | Per-slice fetch | `VX_CFG_FETCH_WIDTH` | Equal to the issue width (a power of two) | | Fetch L0 | `VX_CFG_ICACHE_L0_ENABLE`, `VX_CFG_ICACHE_L0_LINES` | **Off**; 4 lines. Fixed-length fetch only (no C extension). | +| Icache stream prefetch | `VX_CFG_ICACHE_STREAM_ENABLE` | **Off**. Needs the fetch L0. | | Miss tracking | `VX_CFG_{DCACHE,L2,L3}_MSHR_SIZE`, `VX_CFG_LSU_PENDING_LIMIT` | Derived from the platform's bandwidth × latency (`VX_CFG_PLATFORM_MEMORY_PEAK_BW`, `VX_CFG_PLATFORM_CLOCK_RATE`, `VX_CFG_PLATFORM_MEMORY_LATENCY`, `VX_CFG_{L1,L2}_LINK_LATENCY`). The stock shapes set no memory latency and resolve to the floors: 16 MSHR entries, an LSU limit of 32 | | Non-power-of-two way count | `VX_CFG_{ICACHE,DCACHE,L2,L3}_NUM_WAYS` | 4, 4, 8, 8. Any count; the sets per bank stay a power of two | | Stack interleave | `VX_CFG_LSU_STACK_INTERLEAVE_ENABLE` | On | @@ -129,6 +130,7 @@ Some of these features can be set with a `VX_CFG_*` knob (see [Build Configurati - Once an instruction is delivered, the L0 delivers the warp's next instruction behind it (a run), into the next line too when the L0 holds it, up to 16. The warp stays locked until the run's last instruction is decoded. Decode drops the instruction behind a stalling one, and the run gives its ibuffer slot back. - One prefetch of the next line per slice is in flight at a time, sent in a cycle no fetch misses. - The slices share one icache port, round-robin, and the icache has one bank. +- With `VX_CFG_ICACHE_STREAM_ENABLE`, a slice also asks the icache for the line 4 past the one a fetch or a run enters, at the lowest priority, and drops the response. It does so only while recent prefetch responses came back late (two or more 16-cycle ticks, carried in the request tag), so code that fits in the icache sends none. - The icache flush invalidates the L0. - SimX models the same structure in `fetch_l0()`. diff --git a/docs/proposals/icache_stream_prefetch_design_note.md b/docs/proposals/icache_stream_prefetch_design_note.md new file mode 100644 index 0000000000..27b9a994cf --- /dev/null +++ b/docs/proposals/icache_stream_prefetch_design_note.md @@ -0,0 +1,14 @@ +# Design note: icache stream prefetch from the fetch L0 + +| Field | Content | +|---|---| +| **Goal** | Hide the icache miss latency for straight-line code larger than the icache. The fetch L0 already prefetches the next line into itself, but when that line misses the icache, the prefetch comes back too late and the warp waits for memory. Kernels with many registers per thread are long and unrolled, and few warps hide that wait. | +| **Extension point** | None reaches it, for the same reason as the L0's: the requests come from the L0 inside `VX_fetch`, the only place that knows which lines a warp is about to enter. Gated by `VX_CFG_ICACHE_STREAM_ENABLE` (default off; it needs `VX_CFG_ICACHE_L0_ENABLE`). With the knob off, the L0 is the same hardware (V-ISO-3). | +| **Mainstream analogue** | A sequential (next-N-line) instruction prefetcher, as CPU and GPU front ends commonly place in front of or inside the instruction cache. Here the per-slice L0 drives it, and only while prefetches miss the icache. | +| **Alternatives considered** | (1) **Next-N-line prefetch inside the icache.** The icache knows hit or miss exactly, so it needs no tick heuristic, no extra tag bits and no slots on the fetch port. This is the isolated alternative. It was not built; the maintainer is asked to waive V-ISO-6 items 2 and 3 for it. Its cost is a prefetch queue and miss logic in the shared icache, which every configuration pays. (2) **A deeper L0 next-line prefetch (2–4 lines into the L0).** It takes L0 lines away from the loops that reuse them, and it still waits on memory when the icache misses. (3) **Always streaming, without the late-response gate.** It spends icache and memory bandwidth on code that already fits. | +| **Budget** | Knob off (L0 on): the same RTL as the L0 alone (Beacon `top_vortex` against b75058d66) and the same cycles. Knob on: see the PR for Beacon depth and area. Parity: `parity-l0-stream-jacobi`, `parity-l0-stream-dogfood` and `parity-l0-stream-fw2`, all with a 4 KB icache. | +| **SimX plan** | In `fetch_l0()`: the wanted stream line, the two-entry sent filter, the confidence counter, the 16-cycle tick in the prefetch tag (counted from reset, like the RTL's), and the lowest-priority request on the slice's request buffer. A stream response is counted in `pending_ifetches_` until it returns, so the core does not go quiescent while one is in flight. | +| **Verification plan** | The three parity cases. dogfood on SimX had hung at test 20 when a stream request was still in flight at the end of a kernel; it now passes on both models. | +| **Forward progress** | No new lock, hold or credit. Stream requests rank below demand misses and L0 prefetches within a slice, and their responses are always accepted and dropped. | +| **Migration** | One commit with the RTL, SimX, knob and parity cases on top of the L0, then the perf baselines re-recorded for the new knob's config hash. | +| **Open questions** | Whether the maintainer waives the measured isolated alternative and gain (V-ISO-6 items 2 and 3) for this preliminary step; on master kernels the stream is close to neutral (see the PR). | diff --git a/hw/rtl/VX_gpu_pkg.sv b/hw/rtl/VX_gpu_pkg.sv index f8641ab80b..0a275c7359 100644 --- a/hw/rtl/VX_gpu_pkg.sv +++ b/hw/rtl/VX_gpu_pkg.sv @@ -2133,8 +2133,16 @@ package VX_gpu_pkg; // Core request tag Id bits: the warp id local to the requesting frontend slice localparam ICACHE_TAG_ID_BITS = FETCH_WFS_W; - // An L0 prefetch is marked in its request tag. - localparam ICACHE_FETCH_PF_BITS = (ICACHE_L0_LINES != 0) ? 1 : 0; + // The L0's icache stream prefetch +`ifdef VX_CFG_ICACHE_STREAM_ENABLE + localparam ICACHE_STREAM = (ICACHE_L0_LINES != 0); +`else + localparam ICACHE_STREAM = 0; +`endif + + // An L0 prefetch is marked in its request tag; with the stream prefetch, so + // is a stream request and the 16-cycle tick a prefetch left in. + localparam ICACHE_FETCH_PF_BITS = (ICACHE_L0_LINES == 0) ? 0 : (ICACHE_STREAM ? 6 : 1); // Core request tag bits as VX_fetch writes them (UUID + [L0 prefetch] + warp id). localparam ICACHE_FETCH_TAG_WIDTH = (UUID_WIDTH + ICACHE_FETCH_PF_BITS + ICACHE_TAG_ID_BITS); diff --git a/hw/rtl/core/VX_fetch.sv b/hw/rtl/core/VX_fetch.sv index 3981e37449..4a008a932b 100644 --- a/hw/rtl/core/VX_fetch.sv +++ b/hw/rtl/core/VX_fetch.sv @@ -51,6 +51,9 @@ module VX_fetch import VX_gpu_pkg::*; #( localparam WID_W = `LOG2UP(NUM_WARPS); `STATIC_ASSERT (WID_W == ICACHE_TAG_ID_BITS, ("invalid parameter")) +`ifdef VX_CFG_ICACHE_STREAM_ENABLE + `STATIC_ASSERT (ICACHE_L0_LINES != 0, ("the icache stream prefetch needs the fetch L0")) +`endif wire [WID_W-1:0] sched_wid = schedule_if.data.wid[WID_W-1:0]; if (NW_WIDTH > WID_W) begin : g_sched_wid_unused @@ -81,12 +84,14 @@ module VX_fetch import VX_gpu_pkg::*; #( assign req_tag = sched_wid; wire rsp_pf; + wire [`UP(ICACHE_FETCH_PF_BITS)-1:0] rsp_pfb; if (ICACHE_FETCH_PF_BITS != 0) begin : g_rsp_pf - assign {rsp_uuid, rsp_pf, rsp_tag} = icache_bus_if.rsp_data.tag; + assign {rsp_uuid, rsp_pfb, rsp_tag} = icache_bus_if.rsp_data.tag; end else begin : g_rsp_no_pf assign {rsp_uuid, rsp_tag} = icache_bus_if.rsp_data.tag; - assign rsp_pf = 1'b0; + assign rsp_pfb = '0; end + assign rsp_pf = rsp_pfb[0]; VX_dp_ram #( .DATAW (PC_BITS + `VX_CFG_NUM_THREADS + NCTA_WIDTH), @@ -358,7 +363,9 @@ module VX_fetch import VX_gpu_pkg::*; #( wire rsp_take = rsp_demand && (ob_count != 2'd2); assign icache_bus_if.rsp_ready = rsp_pf || (ob_count != 2'd2); wire rsp_fire = icache_bus_if.rsp_valid && icache_bus_if.rsp_ready; - wire install = rsp_fire && ~(rsp_pf && pf_stale_r) && ~(| rsp_match); + // a stream prefetch's response is dropped + wire rsp_ipf; + wire install = rsp_fire && ~rsp_ipf && ~(rsp_pf && pf_stale_r) && ~(| rsp_match); wire [NWW-1:0] rsp_way = (| rsp_match) ? rsp_hit_way : l0_victim; // one L0 read: the front's next instruction while it runs, else the hit @@ -388,15 +395,21 @@ module VX_fetch import VX_gpu_pkg::*; #( wire [31:0] rd_instr = rd_words[rd_idx]; wire [31:0] rsp_instr = icache_bus_if.rsp_data.data[rsp_PC[2-PC_LSB +: FW_WORDSW] * 32 +: 32]; - // a fetch miss asks the icache; else a prefetch of the line it wants next + // a fetch miss asks the icache; else a prefetch of the line it wants + // next; else the stream prefetch + wire ipf_want; + wire [AW-1:0] ipf_line; + wire [ICACHE_FETCH_PF_BITS-1:0] req_pfb; wire demand_req = schedule_if.valid && ~sched_hit; wire pf_req = pf_want_r && ~pf_inflight_r && ~(| want_match) && ~demand_req; - assign icache_req_valid = demand_req || pf_req; + wire ipf_req = ipf_want && ~demand_req && ~pf_req; + assign icache_req_valid = demand_req || pf_req || ipf_req; assign icache_req_pf = ~demand_req; - assign icache_req_addr = demand_req ? sched_line : pf_want_line_r; - assign icache_req_tag = {icache_req_uuid, icache_req_pf, icache_req_wid}; + assign icache_req_addr = demand_req ? sched_line : (ipf_req ? ipf_line : pf_want_line_r); + assign icache_req_tag = {icache_req_uuid, req_pfb, icache_req_wid}; assign schedule_if.ready = sched_hit ? hit_take : icache_req_ready; - wire pf_fire = icache_req_fire && pf_req; + wire pf_fire = icache_req_fire && pf_req; + wire ipf_fire = icache_req_fire && ipf_req; // the next prefetch wanted: a scheduled fetch's, else a crossing run's wire sched_want = schedule_if.valid && ~(| next_match) && ~(pf_inflight_r && (pf_pline_r == sched_line)); @@ -474,12 +487,12 @@ module VX_fetch import VX_gpu_pkg::*; #( end if (pf_fire) begin pf_inflight_r <= 1'b1; - end else if (rsp_fire && rsp_pf) begin + end else if (rsp_fire && rsp_pf && ~rsp_ipf) begin pf_inflight_r <= 1'b0; end if (icache_flush && pf_inflight_r) begin pf_stale_r <= 1'b1; - end else if (rsp_fire && rsp_pf) begin + end else if (rsp_fire && rsp_pf && ~rsp_ipf) begin pf_stale_r <= 1'b0; end end @@ -511,6 +524,78 @@ module VX_fetch import VX_gpu_pkg::*; #( end end + if (ICACHE_STREAM) begin : g_stream + // Below the L0's next line, the stream prefetch asks the icache for + // the line IPF_DIST past the one a fetch or a run enters, unless it + // is one of the last two sent. It runs only while recent prefetches + // came back late (two or more 16-cycle ticks), i.e. missed the icache. + localparam IPF_DIST = 4; + reg ipf_want_r; + reg [AW-1:0] ipf_line_r; + reg [1:0] ipf_sent_v_r; + reg [1:0][AW-1:0] ipf_sent_r; + reg [1:0] ipf_conf_r; + reg [7:0] tick_r; + + wire [AW-1:0] sched_ipf_line = sched_line + AW'(IPF_DIST); + wire [AW-1:0] cross_ipf_line = front_line + AW'(1 + IPF_DIST); + // a line already wanted or one of the last two sent is not asked again + wire sched_ipf_sent = (ipf_want_r && (ipf_line_r == sched_ipf_line)) + || (ipf_sent_v_r[0] && (ipf_sent_r[0] == sched_ipf_line)) + || (ipf_sent_v_r[1] && (ipf_sent_r[1] == sched_ipf_line)); + wire cross_ipf_sent = (ipf_want_r && (ipf_line_r == cross_ipf_line)) + || (ipf_sent_v_r[0] && (ipf_sent_r[0] == cross_ipf_line)) + || (ipf_sent_v_r[1] && (ipf_sent_r[1] == cross_ipf_line)); + wire sched_ipf = schedule_if.valid && (ipf_conf_r != 2'd0) && ~sched_ipf_sent; + wire cross_ipf = front_rewrite && front_cross && (ipf_conf_r != 2'd0) && ~cross_ipf_sent; + wire rsp_late = (4'(tick_r[7:4] - rsp_pfb[5:2]) >= 4'd2); + + always @(posedge clk) begin + if (reset) begin + ipf_want_r <= 1'b0; + ipf_sent_v_r <= '0; + ipf_conf_r <= '0; + tick_r <= '0; + end else begin + tick_r <= tick_r + 8'd1; + if (icache_flush) begin + ipf_want_r <= 1'b0; + end else if (sched_ipf || cross_ipf) begin + ipf_want_r <= 1'b1; + end else if (ipf_fire) begin + ipf_want_r <= 1'b0; + end + if (icache_flush) begin + ipf_sent_v_r <= '0; + end else if (ipf_fire) begin + ipf_sent_v_r <= {ipf_sent_v_r[0], 1'b1}; + end + if (rsp_fire && rsp_pf) begin + ipf_conf_r <= rsp_late ? 2'd3 : ((ipf_conf_r != 2'd0) ? (ipf_conf_r - 2'd1) : 2'd0); + end + end + if (sched_ipf) begin + ipf_line_r <= sched_ipf_line; + end else if (cross_ipf) begin + ipf_line_r <= cross_ipf_line; + end + if (ipf_fire) begin + ipf_sent_r <= {ipf_sent_r[0], ipf_line_r}; + end + end + + assign ipf_want = ipf_want_r; + assign ipf_line = ipf_line_r; + assign rsp_ipf = rsp_pfb[1]; + assign req_pfb = {tick_r[7:4], ipf_req, icache_req_pf}; + end else begin : g_no_stream + assign ipf_want = 1'b0; + assign ipf_line = '0; + assign rsp_ipf = 1'b0; + assign req_pfb = icache_req_pf; + `UNUSED_VAR (ipf_fire) + end + assign run_take = NUM_WARPS'(front_rewrite) << ob_r[0].wid; assign run_refund = NUM_WARPS'(front_drop) << ob_r[0].wid; diff --git a/sim/simx/constants.h b/sim/simx/constants.h index 41768a9c0a..8bbd6905e7 100644 --- a/sim/simx/constants.h +++ b/sim/simx/constants.h @@ -157,6 +157,13 @@ inline constexpr uint32_t ICACHE_L0_LINES = VX_CFG_ICACHE_L0_LINES; inline constexpr uint32_t ICACHE_L0_LINES = 0; #endif inline constexpr uint32_t ICACHE_NUM_REQS = (ICACHE_L0_LINES != 0) ? 1 : VX_CFG_FETCH_WIDTH; +// The L0's icache stream prefetch. +#ifdef VX_CFG_ICACHE_STREAM_ENABLE +static_assert(ICACHE_L0_LINES != 0, "the icache stream prefetch needs the fetch L0"); +inline constexpr bool ICACHE_STREAM = true; +#else +inline constexpr bool ICACHE_STREAM = false; +#endif static_assert(VX_CFG_ISSUE_WIDTH != 0 && (VX_CFG_ISSUE_WIDTH & (VX_CFG_ISSUE_WIDTH - 1)) == 0, "ISSUE_WIDTH must be a power of two: the RTL takes a warp's issue slice from the low bits of its id"); static_assert(VX_CFG_FETCH_WIDTH != 0 && (VX_CFG_FETCH_WIDTH & (VX_CFG_FETCH_WIDTH - 1)) == 0 diff --git a/sim/simx/core.cpp b/sim/simx/core.cpp index 2f51bdb0b1..1f2cd31f63 100644 --- a/sim/simx/core.cpp +++ b/sim/simx/core.cpp @@ -504,6 +504,7 @@ class Core::Impl { PcProfTable* pc_prof() const { return pc_prof_.get(); } void reset() { + l0_tick_base_ = SimPlatform::instance().cycles(); for (auto& arb : ibuffer_arbs_) { arb.reset(); } @@ -616,7 +617,7 @@ class Core::Impl { #ifdef VX_CFG_ICACHE_L0_ENABLE // an L0 prefetch may still be wanted, queued or in flight for (auto &l0 : l0_) { - if (l0.pf_want || l0.pf_inflight || !l0.reqq.empty() || !l0.out.empty()) { + if (l0.pf_want || l0.pf_inflight || l0.ipf_want || !l0.reqq.empty() || !l0.out.empty()) { return false; } } @@ -765,7 +766,34 @@ class Core::Impl { bool cont; }; static constexpr uint32_t L0_PF_TAG = 0x80000000u; + static constexpr uint32_t L0_IPF_TAG = 0x40000000u; static constexpr uint32_t L0_SLICE_SHIFT = 16; + static constexpr uint32_t L0_STAMP_MASK = 0xf; + // the 16-cycle tick a prefetch leaves in, carried in its tag + uint32_t l0_tick(uint64_t now) const { return ((now - l0_tick_base_) >> 4) & L0_STAMP_MASK; } + + // The stream prefetch: L0_IPF_DIST lines past a line a fetch or a run + // enters, unless it is the line already wanted at the start of the cycle + // (want0, line0) or one of the last two sent; only while recent prefetches + // came back late, i.e. missed the icache. + template + void ipf_note(L &l0, Word line, bool ¬ed, bool want0, Word line0) { + if (!ICACHE_STREAM || l0.ipf_conf == 0) { + return; + } + Word t = line + L0_IPF_DIST; + if (want0 && line0 == t) { + return; + } + for (auto &e : l0.ipf_sent) { + if (e.first && e.second == t) { + return; + } + } + l0.ipf_want = true; + l0.ipf_line = t; + noted = true; + } void l0_fill_code(instr_trace_t *trace, const uint8_t *line) { uint32_t offset = trace->PC & (VX_CFG_MEM_BLOCK_SIZE - 1); @@ -831,7 +859,8 @@ class Core::Impl { // waits, and its prefetch state std::array occ; std::array running, rsp_waiting, pf_want, pf_present; - std::array xwant{}; + std::array xwant{}, ipf_want, ipf_noted{}, ipf_fired{}; + std::array ipf_line; std::array pf_want_line; std::array reqq_size; for (uint32_t f = 0; f < FW; ++f) { @@ -844,6 +873,8 @@ class Core::Impl { pf_want[f] = l0.pf_want; pf_want_line[f] = l0.pf_want_line; pf_present[f] = l0.pf_want && this->l0_lookup(f, l0.pf_want_line * VX_CFG_MEM_BLOCK_SIZE) >= 0; + ipf_want[f] = l0.ipf_want; + ipf_line[f] = l0.ipf_line; } if (!icache_rsp.empty() && !(icache_rsp.peek().tag & L0_PF_TAG)) { rsp_waiting[icache_rsp.peek().tag >> L0_SLICE_SHIFT] = true; @@ -895,6 +926,7 @@ class Core::Impl { xwant[f] = true; l0.pf_want_line = nline + 1; } + this->ipf_note(l0, nline, ipf_noted[f], ipf_want[f], ipf_line[f]); } this->l0_fill_code(nt, l0.lines.at(nway).data.data()); trace->run_more = true; @@ -919,6 +951,7 @@ class Core::Impl { auto trace = fetch_latch.peek(); auto &l0 = l0_.at(f); Word next_line = trace->PC / VX_CFG_MEM_BLOCK_SIZE + 1; + this->ipf_note(l0, next_line - 1, ipf_noted[f], ipf_want[f], ipf_line[f]); int next_way = this->l0_lookup(f, next_line * VX_CFG_MEM_BLOCK_SIZE); if (next_way < 0 && !(l0.pf_inflight && l0.pf_line == next_line)) { want_set[f] = true; @@ -943,9 +976,17 @@ class Core::Impl { if (!icache_rsp.empty()) { auto &mem_rsp = icache_rsp.peek(); assert(mem_rsp.data && "icache response must carry line payload"); - uint32_t f = (mem_rsp.tag & ~L0_PF_TAG) >> L0_SLICE_SHIFT; + uint32_t f = (mem_rsp.tag & ~(L0_PF_TAG | L0_IPF_TAG)) >> L0_SLICE_SHIFT; auto &l0 = l0_.at(f); - if (mem_rsp.tag & L0_PF_TAG) { + if (ICACHE_STREAM && (mem_rsp.tag & L0_PF_TAG)) { + // a prefetch back late (two or more 16-cycle ticks) missed the icache + bool late = ((l0_tick(now) - mem_rsp.tag) & L0_STAMP_MASK) >= 2; + l0.ipf_conf = late ? 3 : (l0.ipf_conf ? l0.ipf_conf - 1 : 0); + } + if (mem_rsp.tag & L0_IPF_TAG) { + icache_rsp.pop(); + --pending_ifetches_; + } else if (mem_rsp.tag & L0_PF_TAG) { assert(l0.pf_inflight); if (!l0.pf_stale) { this->l0_install(f, l0.pf_line * VX_CFG_MEM_BLOCK_SIZE, mem_rsp.data->data()); @@ -990,7 +1031,7 @@ class Core::Impl { auto &l0 = l0_.at(f); if (reqq_size[f] >= 2) { // a request waits for room in the slice's request buffer - if (miss[f] != nullptr || (pf_want[f] && !l0.pf_inflight && !pf_present[f])) { + if (miss[f] != nullptr || (pf_want[f] && !l0.pf_inflight && !pf_present[f]) || ipf_want[f]) { ++perf_stats_.fetch_stalls; } continue; @@ -1010,12 +1051,20 @@ class Core::Impl { fetch_latch_.at(f)->pop(); } else if (pf_want[f] && !l0.pf_inflight && !pf_present[f]) { mem_req.addr = pf_want_line[f] * VX_CFG_MEM_BLOCK_SIZE; - mem_req.tag = L0_PF_TAG | (f << L0_SLICE_SHIFT); + mem_req.tag = L0_PF_TAG | (f << L0_SLICE_SHIFT) | (ICACHE_STREAM ? l0_tick(now) : 0); mem_req.hart_id = simobject_->id(); DT(3, simobject_->name() << " l0-prefetch: addr=0x" << std::hex << mem_req.addr << std::dec); l0.pf_inflight = true; l0.pf_line = pf_want_line[f]; pf_want[f] = false; + } else if (ipf_want[f]) { + mem_req.addr = ipf_line[f] * VX_CFG_MEM_BLOCK_SIZE; + mem_req.tag = L0_PF_TAG | L0_IPF_TAG | (f << L0_SLICE_SHIFT) | l0_tick(now); + mem_req.hart_id = simobject_->id(); + DT(3, simobject_->name() << " icache-prefetch: addr=0x" << std::hex << mem_req.addr << std::dec); + l0.ipf_sent[1] = l0.ipf_sent[0]; + l0.ipf_sent[0] = {true, ipf_line[f]}; + ipf_fired[f] = true; } else { continue; } @@ -1026,6 +1075,9 @@ class Core::Impl { for (uint32_t f = 0; f < FW; ++f) { auto &l0 = l0_.at(f); l0.hit_waited = hit_waits[f]; + if (ipf_fired[f] && !ipf_noted[f]) { + l0.ipf_want = false; + } if (want_set[f] || xwant[f]) { l0.pf_want = true; } else { @@ -1043,6 +1095,8 @@ class Core::Impl { l0.victim = 0; l0.pf_want = false; l0.pf_stale = l0.pf_inflight; + l0.ipf_want = false; + l0.ipf_sent = {}; for (auto &e : l0.out) { e.nx = -1; } @@ -1993,6 +2047,10 @@ class Core::Impl { static_assert(ICACHE_L0_LINES >= 1, "the L0 needs at least one line"); // instructions one run can deliver before its slot serves another fetch static constexpr uint32_t L0_RUN_MAX = 16; + // lines ahead of the fetch the stream prefetch asks for + static constexpr uint32_t L0_IPF_DIST = 4; + // the cycle of the last reset, from which the stream prefetch's tick counts + uint64_t l0_tick_base_ = 0; // per fetch slice: whole icache lines, replaced round-robin, and its output buffer struct L0 { struct Line { @@ -2010,6 +2068,12 @@ class Core::Impl { Word pf_line = 0; // the icache was flushed while the prefetch was in flight: its line is not installed bool pf_stale = false; + // the stream prefetch wanted next, the last two sent, and how recently a + // prefetch missed the icache + bool ipf_want = false; + Word ipf_line = 0; + std::array, 2> ipf_sent{}; + uint32_t ipf_conf = 0; // a fetch hit but could not enter the output buffer last cycle bool hit_waited = false; // the requests on their way to the shared icache port, and the cycle each From 3c458b8097e8466e38f31b4447fd1197a2050a95 Mon Sep 17 00:00:00 2001 From: jel221 Date: Thu, 3 Dec 2026 10:49:46 -0800 Subject: [PATCH 2/2] ci: re-record perf baselines for VX_CFG_ICACHE_STREAM_ENABLE's config hash The new knob changes the resolved config, so every perf_gate case's config_hash moves. Cycles and instruction counts are unchanged in all 51 cases (the knob is off by default). Command: pytest ../ci -m perf_gate --update-baselines (from a configured XLEN 32 build tree). Re-recorded by: agent, authorized by jel221 2026-12-03 --- ci/baselines/perf/core.json | 34 +++++++++++++++---------------- ci/baselines/perf/dxa.json | 22 ++++++++++---------- ci/baselines/perf/graphics.json | 18 ++++++++-------- ci/baselines/perf/raytracing.json | 6 +++--- ci/baselines/perf/tensor.json | 12 +++++------ ci/baselines/perf/tensor_mx.json | 2 +- ci/baselines/perf/tensor_sp.json | 2 +- ci/baselines/perf/tensor_wg.json | 6 +++--- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/ci/baselines/perf/core.json b/ci/baselines/perf/core.json index 5a717f7b02..1c8634f424 100644 --- a/ci/baselines/perf/core.json +++ b/ci/baselines/perf/core.json @@ -6,7 +6,7 @@ }, "app": "raycast", "args": "", - "config_hash": "ee62a428d0faeabb", + "config_hash": "96d42b4c8df45fd3", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "raycast", "args": "", - "config_hash": "582945597853fc7a", + "config_hash": "c041c74c6cdf80b5", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "sgemm", "args": "-n128", - "config_hash": "c4ed8061884b8581", + "config_hash": "67228a9770a0ff16", "configs": "-DVX_CFG_NUM_WARPS=8 -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=16 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -39,7 +39,7 @@ }, "app": "sgemm", "args": "-n128", - "config_hash": "6d28c41cb33bab0a", + "config_hash": "960d0a80bbb98506", "configs": "-DVX_CFG_NUM_WARPS=8 -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=4 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -50,7 +50,7 @@ }, "app": "sgemm", "args": "-n128", - "config_hash": "f2953a53cc1970ff", + "config_hash": "04420cfd60c45de6", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -61,7 +61,7 @@ }, "app": "sgemm", "args": "-n128", - "config_hash": "cd10e4f446959b85", + "config_hash": "14df404ee13ec736", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -72,7 +72,7 @@ }, "app": "sgemm2", "args": "-n64 -t4", - "config_hash": "5ad3bee978bc681d", + "config_hash": "76dcf247c15172fd", "configs": "-DVX_CFG_EXT_LDST_WIDE_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -83,7 +83,7 @@ }, "app": "sgemmx", "args": "-n128", - "config_hash": "696055b197a0176e", + "config_hash": "34649a64cb30061e", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -94,7 +94,7 @@ }, "app": "sgemmx", "args": "-n128", - "config_hash": "83033a42a7ef3c6f", + "config_hash": "892baa25ed4f1a80", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -105,7 +105,7 @@ }, "app": "sgemv", "args": "-m512 -n512", - "config_hash": "26982abdfbeb85ee", + "config_hash": "799382fa85661906", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -116,7 +116,7 @@ }, "app": "sgemv", "args": "-m512 -n512", - "config_hash": "71520c03ef99f807", + "config_hash": "1bdd54a6563e8275", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -127,7 +127,7 @@ }, "app": "softmax", "args": "-n64", - "config_hash": "dac769be8957ba2d", + "config_hash": "b6b94847d69f9e2b", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -138,7 +138,7 @@ }, "app": "softmax", "args": "-n64", - "config_hash": "d050a332df68acaa", + "config_hash": "d0414d4082bf73aa", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -149,7 +149,7 @@ }, "app": "stencil3d", "args": "-n32", - "config_hash": "c5893a783df02fa6", + "config_hash": "2481638a112fc234", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -160,7 +160,7 @@ }, "app": "stencil3d", "args": "-n32", - "config_hash": "98aba4d66a20a6c5", + "config_hash": "bbc10d0ff76c4368", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -171,7 +171,7 @@ }, "app": "vecadd", "args": "-n16384", - "config_hash": "eec2891c0f4dc7d1", + "config_hash": "78691c448a12cbb4", "configs": "-DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -182,7 +182,7 @@ }, "app": "vecadd", "args": "-n16384", - "config_hash": "43c063b7b2bc8353", + "config_hash": "5483d9cf12081f91", "configs": "-DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" } diff --git a/ci/baselines/perf/dxa.json b/ci/baselines/perf/dxa.json index 1c9b8a19e3..03977cc0a1 100644 --- a/ci/baselines/perf/dxa.json +++ b/ci/baselines/perf/dxa.json @@ -6,7 +6,7 @@ }, "app": "dxa_copy_mcast", "args": "", - "config_hash": "6508d11862252bfc", + "config_hash": "1a45e71162879a40", "configs": "-DVX_CFG_EXT_DXA_ENABLE", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "dxa_copy", "args": "-d1", - "config_hash": "94b5f6ff7e05a12d", + "config_hash": "e6604cc684bd0b3a", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "dxa_copy", "args": "-d1", - "config_hash": "276aa7f1b3fef5b2", + "config_hash": "7a021c54f188efae", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -39,7 +39,7 @@ }, "app": "sgemm2_dxa_mcast", "args": "-n128", - "config_hash": "baf0ca5f70fbffd8", + "config_hash": "b1e4927dcb13d086", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -50,7 +50,7 @@ }, "app": "sgemm2_dxa_mcast", "args": "-n128", - "config_hash": "1e4e377e4c0998e5", + "config_hash": "c9c5ee90403cb7e0", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -61,7 +61,7 @@ }, "app": "sgemm2_dxa", "args": "-n128 -t4 -m1", - "config_hash": "c9fa6f2e8840411c", + "config_hash": "914144c7b3867f5a", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -72,7 +72,7 @@ }, "app": "sgemm2_dxa", "args": "-n128 -t4 -m1", - "config_hash": "7022cd727b55cdbc", + "config_hash": "ec556b992c2bda2b", "configs": "-DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -83,7 +83,7 @@ }, "app": "sgemm_tcu_wg_dxa_mcast", "args": "-m 128 -n 128 -k 64", - "config_hash": "5eadebf206b6b001", + "config_hash": "db73a0ab5a81a96b", "configs": "-DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1 -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -94,7 +94,7 @@ }, "app": "sgemm_tcu_wg_dxa_mcast", "args": "-m 128 -n 128 -k 64", - "config_hash": "cb0f3a92496dfd01", + "config_hash": "5f64c0958e859569", "configs": "-DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_EXT_DXA_ENABLE -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1 -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -105,7 +105,7 @@ }, "app": "sgemm_tcu_wg_dxa", "args": "-m 128 -n 128 -k 64", - "config_hash": "8e59bba128dd8ae0", + "config_hash": "1cee6c934e323a18", "configs": "-DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_WGMMA_ENABLE -DVX_CFG_EXT_DXA_ENABLE -DWGMMA_NRC=16 -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_NUM_THREADS=32", "driver": "rtlsim" }, @@ -116,7 +116,7 @@ }, "app": "sgemm_tcu_wg_sp_dxa", "args": "-m 128 -n 128 -k 128", - "config_hash": "68878a6e505b9748", + "config_hash": "5130357c63815a37", "configs": "-DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_WGMMA_ENABLE -DVX_CFG_TCU_SPARSE_ENABLE -DVX_CFG_EXT_DXA_ENABLE -DWGMMA_NRC=32 -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_NUM_THREADS=32", "driver": "rtlsim" } diff --git a/ci/baselines/perf/graphics.json b/ci/baselines/perf/graphics.json index ebde81d14d..ce2044bcf8 100644 --- a/ci/baselines/perf/graphics.json +++ b/ci/baselines/perf/graphics.json @@ -6,7 +6,7 @@ }, "app": "gfx_draw3d", "args": "-w 128 -h 128 -t box.cgltrace -r box_ref_128.png", - "config_hash": "61ac2bea9e718ae6", + "config_hash": "8c8b4138ffb2dbcf", "configs": "-DVX_CFG_EXT_TEX_ENABLE -DVX_CFG_EXT_RASTER_ENABLE -DVX_CFG_EXT_OM_ENABLE -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=4 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "gfx_draw3d", "args": "-w 128 -h 128 -t box.cgltrace -r box_ref_128.png", - "config_hash": "d72e5cb799606e6d", + "config_hash": "ff398b7cab7c6067", "configs": "-DVX_CFG_EXT_TEX_ENABLE -DVX_CFG_EXT_RASTER_ENABLE -DVX_CFG_EXT_OM_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "gfx_draw3d", "args": "-w 128 -h 128 -t box.cgltrace -r box_ref_128.png", - "config_hash": "4a13f956a2d5d572", + "config_hash": "73fe2a4435b5a36c", "configs": "-DVX_CFG_EXT_TEX_ENABLE -DVX_CFG_EXT_RASTER_ENABLE -DVX_CFG_EXT_OM_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -39,7 +39,7 @@ }, "app": "gfx_om", "args": "-w 128 -h 128 -r whitebox_128.png", - "config_hash": "d3d0d33d18bf8b9a", + "config_hash": "836799e4611fcffb", "configs": "-DVX_CFG_EXT_OM_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -50,7 +50,7 @@ }, "app": "gfx_om", "args": "-w 128 -h 128 -r whitebox_128.png", - "config_hash": "8751642a0d79a809", + "config_hash": "80061d4867da7a85", "configs": "-DVX_CFG_EXT_OM_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -61,7 +61,7 @@ }, "app": "gfx_raster", "args": "-w 128 -h 128 -t triangle.cgltrace -r triangle_ref_128.png", - "config_hash": "9130e9fde569a633", + "config_hash": "542d0f259529b7c7", "configs": "-DVX_CFG_EXT_RASTER_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -72,7 +72,7 @@ }, "app": "gfx_raster", "args": "-w 128 -h 128 -t triangle.cgltrace -r triangle_ref_128.png", - "config_hash": "8f9c1de064541e41", + "config_hash": "61f25457a343a39e", "configs": "-DVX_CFG_EXT_RASTER_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" }, @@ -83,7 +83,7 @@ }, "app": "gfx_tex", "args": "-i toad.png -r toad_ref_f0.png -f 0 -g 0", - "config_hash": "57cd57fec49c1bc6", + "config_hash": "2290a33a626d7bfa", "configs": "-DVX_CFG_EXT_TEX_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -94,7 +94,7 @@ }, "app": "gfx_tex", "args": "-i toad.png -r toad_ref_f0.png -f 0 -g 0", - "config_hash": "4aaa695dfefd46c8", + "config_hash": "da6f057b318e938a", "configs": "-DVX_CFG_EXT_TEX_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" } diff --git a/ci/baselines/perf/raytracing.json b/ci/baselines/perf/raytracing.json index 7f118f020f..9de0f2f532 100644 --- a/ci/baselines/perf/raytracing.json +++ b/ci/baselines/perf/raytracing.json @@ -6,7 +6,7 @@ }, "app": "rt_raycast", "args": "", - "config_hash": "1234a743dca60ff9", + "config_hash": "1bf95dd8f57901a0", "configs": "-DVX_CFG_EXT_RTU_ENABLE -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=4 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "rt_raycast", "args": "", - "config_hash": "4a56ac28c29397af", + "config_hash": "225b83e79332c11f", "configs": "-DVX_CFG_EXT_RTU_ENABLE -DVX_CFG_NUM_THREADS=16", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "rt_raycast", "args": "", - "config_hash": "9210f172fe133bca", + "config_hash": "a0073b33d97f4fb7", "configs": "-DVX_CFG_EXT_RTU_ENABLE -DVX_CFG_NUM_THREADS=4", "driver": "rtlsim" } diff --git a/ci/baselines/perf/tensor.json b/ci/baselines/perf/tensor.json index 2a45091c2c..8cf7b5c97e 100644 --- a/ci/baselines/perf/tensor.json +++ b/ci/baselines/perf/tensor.json @@ -6,7 +6,7 @@ }, "app": "sgemm_tcu", "args": "-m 128 -n 128 -k 128", - "config_hash": "84fc444647522e6e", + "config_hash": "4d22e8c276f0f263", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "sgemm_tcu", "args": "-m 128 -n 128 -k 128", - "config_hash": "7cbd2b6ccbef99c6", + "config_hash": "3b5e41e87e4047b4", "configs": "-DVX_CFG_NUM_WARPS=8 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=16 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "sgemm_tcu", "args": "-m 128 -n 128 -k 128", - "config_hash": "97e84a1efb066f9f", + "config_hash": "4efd9d1bc8d4b718", "configs": "-DVX_CFG_NUM_WARPS=8 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DVX_CFG_NUM_CORES=2 -DVX_CFG_NUM_THREADS=4 -DVX_CFG_L2_ENABLE", "driver": "rtlsim" }, @@ -39,7 +39,7 @@ }, "app": "sgemm_tcu", "args": "-m 128 -n 128 -k 128", - "config_hash": "1455192155e67038", + "config_hash": "d65c30c7b3addd61", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32", "driver": "rtlsim" }, @@ -50,7 +50,7 @@ }, "app": "sgemm2_tcu", "args": "-m 128 -n 128 -k 64", - "config_hash": "6ab260b380e298d0", + "config_hash": "79c85b3297d8ec24", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1", "driver": "rtlsim" }, @@ -61,7 +61,7 @@ }, "app": "sgemm_tcu", "args": "-m 128 -n 128 -k 128", - "config_hash": "56e9ae3efc6e5a11", + "config_hash": "8e79fd2aaa945ad4", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_EXT_TCU_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DVX_CFG_EXT_LDST_MATRIX_ENABLE", "driver": "rtlsim" } diff --git a/ci/baselines/perf/tensor_mx.json b/ci/baselines/perf/tensor_mx.json index 71b80d92c3..8ec5686cad 100644 --- a/ci/baselines/perf/tensor_mx.json +++ b/ci/baselines/perf/tensor_mx.json @@ -6,7 +6,7 @@ }, "app": "sgemm_tcu_mx", "args": "-m 128 -n 128 -k32", - "config_hash": "ab68a67e8ee61342", + "config_hash": "3b1a787305eb0b2a", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_MX_ENABLE -DVX_CFG_TCU_FP8_ENABLE -DITYPE=mxfp8 -DOTYPE=fp32 -DVX_CFG_TCU_TYPE_DPI", "driver": "rtlsim" } diff --git a/ci/baselines/perf/tensor_sp.json b/ci/baselines/perf/tensor_sp.json index f6b28ae402..d6099a26bf 100644 --- a/ci/baselines/perf/tensor_sp.json +++ b/ci/baselines/perf/tensor_sp.json @@ -6,7 +6,7 @@ }, "app": "sgemm_tcu_sp", "args": "-m 128 -n 128 -k 128", - "config_hash": "8afe9207eab1c46b", + "config_hash": "0eee9eafe160e338", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_SPARSE_ENABLE", "driver": "rtlsim" } diff --git a/ci/baselines/perf/tensor_wg.json b/ci/baselines/perf/tensor_wg.json index 0b0174d6e2..cd8d384a83 100644 --- a/ci/baselines/perf/tensor_wg.json +++ b/ci/baselines/perf/tensor_wg.json @@ -6,7 +6,7 @@ }, "app": "sgemm_tcu_wg", "args": "-m64 -n64 -k64", - "config_hash": "d0dc0df7cb32f087", + "config_hash": "b5367469c249cb63", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_WGMMA_ENABLE -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1 -DVX_CFG_TCU_FEDP2K -DITYPE=fp16 -DOTYPE=fp32 -DWGMMA_NRC=8 -DWGMMA_RS", "driver": "rtlsim" }, @@ -17,7 +17,7 @@ }, "app": "sgemm_tcu_wg", "args": "-m 128 -n 128 -k 128", - "config_hash": "87f301da2e139400", + "config_hash": "3b3216ee6003daac", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_WGMMA_ENABLE -DITYPE=fp16 -DOTYPE=fp32 -DWGMMA_NRC=32 -DWGMMA_SS -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1", "driver": "rtlsim" }, @@ -28,7 +28,7 @@ }, "app": "sgemm_tcu_wg_sp", "args": "-m 128 -n 128 -k 128", - "config_hash": "f82c4f5099494fcd", + "config_hash": "4c61f87fa776bfe6", "configs": "-DVX_CFG_NUM_THREADS=8 -DVX_CFG_NUM_WARPS=8 -DVX_CFG_ISSUE_WIDTH=4 -DVX_CFG_EXT_TCU_ENABLE -DVX_CFG_TCU_WGMMA_ENABLE -DVX_CFG_TCU_SPARSE_ENABLE -DWGMMA_NRC=32 -DVX_CFG_NUM_ALU_BLOCKS=1 -DVX_CFG_NUM_LSU_BLOCKS=1 -DVX_CFG_NUM_FPU_BLOCKS=1", "driver": "rtlsim" }