pulse: skip PulsePad's copy and symbol re-resolution on pass-through pulses - #2597
pulse: skip PulsePad's copy and symbol re-resolution on pass-through pulses#2597czoli1976 wants to merge 1 commit into
Conversation
…pulses PulsePad materialized an owned copy of its input before checking whether the pulse needed padding at all, and re-evaluated its symbolic end_input/after expressions on every pulse — a full-pulse copy plus microseconds of TDim walking per frame on every pulsed conv, though padding only applies at the stream head and tail. The pass-through cases now forward the shared value untouched, and the resolved limits are cached against the symbol bindings they were computed from. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Just wanted to mention the existence of core/src/late_bind.rs . Please check if they could make sense for this. |
|
ok, park it, will check
Il giorno sab 8 ago 2026 alle ore 18:16 Mathieu Poumeyrol <
***@***.***> ha scritto:
… *kali* left a comment (sonos/tract#2597)
<#2597 (comment)>
Just wanted to mention the existence of core/src/late_bind.rs . Please
check if they could make sense for this.
—
Reply to this email directly, view it on GitHub
<#2597?email_source=notifications&email_token=APL2Z6RPLELNED2I2K4MXYL5I5G5VA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRSGY4TKMZWGUYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5226953650>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APL2Z6WYCABKLJLURS5PDL35I5G5VAVCNFSNUABEKJSXA33TNF2G64TZHM4TSNJWGEZDCMZ3JFZXG5LFHM2TAOBRGEYDKMZZGWQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/APL2Z6UZL442LBDLG26GE2T5I5G5VA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRSGY4TKMZWGUYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/APL2Z6UWDG5HI7Z6WFD5VW35I5G5VA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRSGY4TKMZWGUYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Best Regards
Ckristian Zoli
Email: ***@***.***
|
|
hmmmmm GeometryBound fits well here: since TurnState::resolved_symbols binds each symbol at most once (set-once in resolve(), later calls must match or error), PadLimits's per-pulse deps.iter().all(...) revalidation is redundant after the first successful resolution — it can only ever go unresolved → resolved, never back. I'll rework PulsePadOpState.limits to GeometryBound<_, (usize, usize)> following the Im2Col pattern, dropping the deps vec in favor of a single is_concrete() check. Need ResolveTo::resolve to bail! on unbound symbols so into_concrete stays Symbolic until the stream length is known, with the same usize::MAX fallback for pulses that arrive before that. Will push an update. |
|
Tried this — reworked PulsePadOpState.limits into a GeometryBound<PulsePadLimitsSym, (usize, usize)> following the Im2Col pattern, dropped the deps vec, passes core-proptest-pulse 72/72 clean. Unfrotunately the gains are complitely gone: the only thing it removes is one HashMap::get per pulse, which doesn't show up against the tensor-copy/TDim-eval costs this PR already killed. It's also strictly less robust than the current code — PadLimits today re-validates against live symbol bindings every pulse and self-heals if a SimpleState were ever reused across streams with different bindings; the GeometryBound version locks in permanently on first resolution and loses that. Given no perf upside and a real (if currently untriggered) robustness risk maybe just drop this PR, WDYT? |
|
Sure. If the abstraction does not work, ditch it, of course. |
PulsePad cloned its input tensor before checking whether the pulse needed padding at all, and re-evaluated its symbolic end_input/after expressions every pulse — a full-pulse copy plus microseconds of TDim walking per frame on every pulsed conv, though padding only applies at the stream head and tail. Pass-through pulses now forward the shared value untouched and the resolved limits are cached against the symbol bindings they came from (so late binding of the stream-length symbol still takes effect); measured on the pulsed DeepFilterNet3 decoders under wasmtime this is −6% end-to-end on df_dec and −2% on erb_dec, with padding semantics covered by core-proptest-pulse (72/72).
🍍
🤖 Generated with Claude Code