Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a9038c4
Add ET_VK_EXECUTE_NODE_THRESHOLD opt-in GPU-watchdog workaround
xuyanwen2012 Jul 22, 2026
745a738
Fix linear_dq8ca_q4gsw wrong output when M > K
SS-JIA Jul 29, 2026
f60080d
[ET-VK] Port dev's shipped 4w/8da4w coopmat tiles + texture-IO WMMA t…
xuyanwen2012 Aug 18, 2026
26f4557
[ET-VK] Ship 8da4w texture-IO tile sweep winner as the new default
xuyanwen2012 Aug 18, 2026
3ceeefc
[ET-VK] Fix q4gsw texture-IO default crash: give it a default variant…
xuyanwen2012 Aug 18, 2026
0320ac3
[ET-VK] Revert 8da4w default to t64x32k32g12s64 -- new tile was numer…
xuyanwen2012 Aug 18, 2026
bcba76d
Document flaky coopmat correctness failure, keep 8da4w default unchanged
xuyanwen2012 Aug 18, 2026
8be6567
[ET-VK] Port SDPA cooperative-matrix (WMMA) shaders to release/1.4
xuyanwen2012 Aug 18, 2026
d7360b7
[ET-VK] Add SDPA coopmat correctness harness (--sdpa-correctness-only)
xuyanwen2012 Aug 18, 2026
7de604d
[ET-VK] Port shmem_double_buf4-tr's coopmat-staged A to 8da4w (UNVALI…
xuyanwen2012 Aug 21, 2026
a11830e
[ET-VK] Cut 8da4w coopmat linear time 33.6% by hoisting the dequant c…
xuyanwen2012 Aug 25, 2026
8cde63e
[ET-VK] Speed up 8da4w coopmat linear: bigger tile, drop B skew, coal…
xuyanwen2012 Aug 26, 2026
249f868
[ET-VK] Promote zpg (zp-hoist + coalesced B-store) as 8da4w coopmat d…
xuyanwen2012 Aug 28, 2026
1f3322c
[ET-VK] SDPA coopmat tile-sweep mechanism, and shader-lab's sanctione…
xuyanwen2012 Aug 28, 2026
009aa29
[ET-VK] Promote coopMat-staged-A ("-tr" on zpg) as 8da4w coopmat default
xuyanwen2012 Sep 2, 2026
7892151
[ET-VK] Fence the LDS staging barriers in both shipped coopmat linear…
xuyanwen2012 Sep 2, 2026
7f43322
[ET-VK] Fix intermittent wrong output in SDPA attn*V coopmat
xuyanwen2012 Sep 3, 2026
65dfa1c
[ET-VK] SDPA coopmat correctness gate: reach every causal-mask region
xuyanwen2012 Sep 3, 2026
df5b8dc
[ET-VK] SDPA QK^T coopmat: all-visible whole-tile fast path
xuyanwen2012 Sep 3, 2026
582ec23
[ET-VK] SDPA softmax: stop reducing over the causally-masked tail
xuyanwen2012 Sep 3, 2026
7886179
[ET-VK] SDPA attn*V coopmat: skip all-zero K-chunks
xuyanwen2012 Sep 3, 2026
8beee48
[ET-VK] Remove the SDPA coopmat bisect switches
xuyanwen2012 Sep 3, 2026
be70eee
[ET-VK] Fence the 4 remaining SDPA coopmat LDS barriers
xuyanwen2012 Sep 3, 2026
921b0cf
[ET-VK] Enable WMMA by default: texture coopmat no longer needs an en…
xuyanwen2012 Sep 8, 2026
ce7b22f
[ET-VK] Six opt-in dq8ca coopmat variants: A-layout and B-staging, al…
xuyanwen2012 Sep 9, 2026
8ff908a
[ET-VK] Remove dead/superseded coopmat tsweep and SDPA-coop shader va…
xuyanwen2012 Sep 15, 2026
1731d59
[ET-VK] Housekeeping pass 2: remove dead qw_coopmat shaders, trim q4g…
xuyanwen2012 Sep 15, 2026
6989c5d
[ET-VK] Housekeeping pass 2 (cont'd): the two files a bad git-add dro…
xuyanwen2012 Sep 15, 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
Empty file modified .ci/scripts/build_llama_android.sh
100644 → 100755
Empty file.
16 changes: 16 additions & 0 deletions backends/vulkan/runtime/graph/ComputeGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,22 @@ ComputeGraph::ComputeGraph(GraphConfig config)
config_.execute_initial_threshold_node_count = 64;
}

// Opt-in GPU-watchdog workaround (default behaviour unchanged). Set
// ET_VK_EXECUTE_NODE_THRESHOLD=N to submit a new command buffer every N graph
// nodes instead of the default 128. A large prefill (e.g. 8B @ 2048 tokens)
// packs > 2.56 s of GPU work into a single 128-node submission, tripping the
// sgpu job watchdog (hard reset, lost run). Submits here are non-blocking
// (execute() defers and fences once at the end), so a smaller N only adds a
// little submit overhead, not a per-batch stall. TEMPORARY measurement aid —
// the real fix is driver-side.
if (const char* thr = std::getenv("ET_VK_EXECUTE_NODE_THRESHOLD")) {
const int n = std::atoi(thr);
if (n > 0) {
config_.execute_threshold_node_count = static_cast<size_t>(n);
config_.execute_initial_threshold_node_count = static_cast<size_t>(n);
}
}

// Check if the underlying GPU can access accelerated integer dot product
// instructions
can_use_int8_dot_product_ =
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

# "zpg" + "-tr" combination: tsweep_dbuf4zpg with its per-thread scalar
# A-staging replaced by tsweep_dbuf4tr's coopMat-mediated A staging. B
# staging, zp-hoist, byte-parallel nibble widening are all dbuf4zpg's,
# unchanged -- only A-staging differs. Requires t_packed_int8_input in the
# ROW-MAJOR kPackedInt8_4W layout (same requirement as tsweep_dbuf4tr).
#
# PROMOTED 2026-09-01 as the shipped default -- see QuantizedLinear.cpp's
# dq8ca_coopmat_variant() for the full validation record (10/10 buffer, 6/6
# texture3d correctness across 1B/3B/8B; +4.2% real e2e prefill; 46.50% ->
# 49.94% efficiency on 8B). Also selectable explicitly via
# ET_VK_DQ8CA_COOPMAT_VARIANT=tsweep_dbuf4zpgtr_t<M>x<N>k<K>g<SGX><SGY>s<sub>.
# See openspec/changes/archive/2026-08-31-dq8ca-tr-staged-a-on-zpg.
#
# Single seed tile: the prior dbuf4zpg default's own tile (t128x64k32g42s32).
# A re-sweep against this shader's own (lower) register-pressure profile was
# run as a follow-up (coopmat-tr-tilesweep-4w-port) and found no better tile
# -- this remains the best known geometry.

linear_dq8ca_q4gsw_coopmat_tsweep_dbuf4zpgtr:
parameter_names_with_default_values:
PRECISION: highp
HAS_BIAS: false
IO_STORAGE: buffer
WEIGHT_NBITS: 4
WEIGHT_STORAGE: texture2d
MMA_M: 16
MMA_N: 16
MMA_K: 16
WG_TILE_M: 64
WG_TILE_N: 32
WG_TILE_K: 32
SG_GRID_X: 1
SG_GRID_Y: 2
SUBGROUP_SIZE: 64
shader_variants:
- NAME: linear_dq8ca_q4gsw_coopmat_tsweep_dbuf4zpgtr_t128x64k32g42s32_buffer_texture2d_half
WEIGHT_NBITS: 4
WEIGHT_STORAGE: texture2d
WG_TILE_M: 128
WG_TILE_N: 64
WG_TILE_K: 32
SG_GRID_X: 4
SG_GRID_Y: 2
SUBGROUP_SIZE: 32
- NAME: linear_dq8ca_q4gsw_coopmat_tsweep_dbuf4zpgtr_t128x64k32g42s32_texture3d_texture2d_half
IO_STORAGE: texture3d
WEIGHT_NBITS: 4
WEIGHT_STORAGE: texture2d
WG_TILE_M: 128
WG_TILE_N: 64
WG_TILE_K: 32
SG_GRID_X: 4
SG_GRID_Y: 2
SUBGROUP_SIZE: 32
Loading