Skip to content

WIP: batched TRT encoder (chunked) — pre-existing, split from the bf16 release#74

Closed
Cortexelus wants to merge 1 commit into
mainfrom
batched-encoder-wip
Closed

WIP: batched TRT encoder (chunked) — pre-existing, split from the bf16 release#74
Cortexelus wants to merge 1 commit into
mainfrom
batched-encoder-wip

Conversation

@Cortexelus

Copy link
Copy Markdown
Collaborator

WIP: batched TRT encoder (chunked) — pre-existing

This is pre-existing work-in-progress, split out of the bf16 medium DiT release so that PR stays clean. It was not authored as part of the bf16 change — it happened to live in the same working copy of scripts/sa3_trt_core.py and was separated out hunk-by-hunk.

What it adds

An optional batched path in encode_chunked (scripts/sa3_trt_core.py): when the encoder engine is built with a dynamic batch dimension (optimization-profile max > 1) and the chunk count is in a sweet spot (BATCHED_ENCODER_MIN_CHUNKS ≤ n ≤ BATCHED_ENCODER_MAX_CHUNKS), all chunks are stacked into a single execute_async_v3 call instead of serial per-chunk calls. Adds helpers _runner_max_batch, _runner_supports_batching, _runner_audio_samples_range, _run_batched, and a reworked short-audio single-shot path.

Status — draft

The shipped encoder engine is batch=1, so the batched path is inert until a batched encoder engine is built. The min/max-chunk thresholds and the BF16/FP16-mixed state-drift behavior across super-batches are still being characterized. Opening as a draft to preserve the work and keep it off the bf16 release PR.

Branched off bbd30b5 (same base as the bf16 release).

@Cortexelus

Copy link
Copy Markdown
Collaborator Author

Pausing the batched-encoder work for now. Closing this PR but keeping the branch batched-encoder-wip with the WIP intact — reopen when we pick it back up.

@Cortexelus Cortexelus closed this Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant