mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 00:34:33 +02:00
156b76aa9c
Autotune sweeps and kernel compiles run inside the first forward pass at a new shape and can take minutes with no indication in the log or UI. Add listeners on the triton autotuning and compilation knobs plus a wrap of the per-candidate benchmark: a sweep draws a console progress bar over its candidates and mirrors the count in the live progress text, the completion line records the kernel, shape, duration and compile share, and standalone compiles over 1s are logged. - fix timer_sdnq reading bench_time from the python wrapper functions instead of the autotuner kernel objects, which left the two matmul autotune timers permanently empty - restore the pre-tuning progress text across chained sweeps, so an abandoned sweep cannot strand its own tuning label in the UI
14 lines
894 B
Python
14 lines
894 B
Python
def update_sdnq_attention_timers():
|
|
from modules.timer import autotune
|
|
autotune.reset()
|
|
from modules.sdnq.kernels import triton_atten, triton_mm, triton_scaled_mm
|
|
if getattr(triton_atten.sdnq_attn_kernel, 'bench_time', None) is not None:
|
|
autotune.add('sdnq_attn_kernel', getattr(triton_atten.sdnq_attn_kernel, 'bench_time', 0))
|
|
triton_atten.sdnq_attn_kernel.bench_time = 0
|
|
if getattr(triton_mm.sdnq_triton_mm_kernel, 'bench_time', None) is not None:
|
|
autotune.add('sdnq_triton_mm', getattr(triton_mm.sdnq_triton_mm_kernel, 'bench_time', 0))
|
|
triton_mm.sdnq_triton_mm_kernel.bench_time = 0
|
|
if getattr(triton_scaled_mm.sdnq_scaled_mm_kernel, 'bench_time', None) is not None:
|
|
autotune.add('sdnq_scaled_mm', getattr(triton_scaled_mm.sdnq_scaled_mm_kernel, 'bench_time', 0))
|
|
triton_scaled_mm.sdnq_scaled_mm_kernel.bench_time = 0
|