Repository navigation
pipeline: initialize once; klein: refuse engines whose I/O types differ - #27
Merged
Merged
Conversation
- pipeline_create already runs init_cuda / npp / engines / buffers, so pipeline_init_all running them again rebuilt every execution context and buffer (~0.7 s per pipeline, a transient second copy of the TensorRT activation memory) and leaked the first CUDA stream. init_all now only validates the handle; init_cuda keeps an existing stream; stream_ is zero-initialized. Output unchanged (48 sync presets pixel-identical). - klein wrappers check each engine's tensor names and dtypes at load. A qwen encoder from an older exporter writes fp32 encoder_hidden_states into a bf16-sized buffer: an illegal address that lost the CUDA context. It is now a load error naming the tensor and asking for a rebuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C4EF6Wn6C3bruJdcjnT9n2
This was referenced Nov 3, 2026
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.
Follow-up to #26: this commit was on that branch locally but not pushed before the merge.
pipeline_createalready runs init_cuda / npp / engines / buffers;pipeline_init_allrunning them again rebuilt every execution context and buffer (~0.7 s per pipeline, a transient second copy of the TensorRT activation memory) and leaked the first CUDA stream.init_allnow only validates the handle;init_cudakeeps an existing stream. No C API symbol changes.🤖 Generated with Claude Code