Repository navigation
TensorRT Edge-LLM 0.4.0 release - #3
Merged
Merged
Conversation
Signed-off-by: Luxiao Zheng <[email protected]>
suharvest
added a commit
to suharvest/TensorRT-Edge-LLM
that referenced
this pull request
May 22, 2026
Codex final audit (finding #1) identified that the slot pool ALREADY allocates per-slot IExecutionContext pairs (cpp:1914-1915 CP, :2952-2953 Talker), but the hot path in three call sites unconditionally falls back to the engine-global mPrefillContext / mDecodeContext whenever no explicit ctxOverride is passed: - CP generatePreparedInputs at cpp:1099-1100 - Talker prefill at cpp:2339-2341 - Talker decode at cpp:2508 Two concurrent handleAudioGeneration calls pass `slot != nullptr` but not `ctxOverride`, so both threads enqueueV3 against the SAME IContext. TRT IExecutionContext is not safe for concurrent enqueue — each call mutates input shapes, tensor address bindings, and profile index. That is the cumulative-state-corruption root cause behind the cudaMemsetAsync(state.read.rawPointer(), ...) illegal-access errors observed after 2-3 N=2 bursts under the prior C1+C2+C3+C5 config. Fix: in each of the three sites, when slot is non-null and owns a context, route through slot->prefillCtxOwned.get() / decodeCtxOwned.get() — keeping ctxOverride priority for the legacy captureDecodingCUDAGraph path. ~10-15 LOC. Empirical post-fix (orin-nx, profile jetson-multilang-highperf-nx, OVS_TTS_WORKER_CONCURRENCY=2, max_workers=2): - 30 sustained N=2 dual-client bursts: zero broken-state TTFAs - Mid-stress + post-stress N=1 audio MD5 = baseline f515a4376962cca876f21089130d7253 (byte-identical) - Audio quality preserved across the full gauntlet Caveat: throughput is now lower than the C2-first-burst peak. slow- client TTFA p50 ~4× single-client baseline, vs 1.4× pre-C6. That's likely findings NVIDIA#2 (slot reused mid-request) + NVIDIA#3 (resetSampling mutates all slots) from the audit — coming in follow-up commits. This commit closes the CRASH path; the THROUGHPUT path needs the remaining audit items addressed. Signed-off-by: suharvest <[email protected]>
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.