[Support] Use explicit inline element count for AccelerationStructureDescs SmallVectors#1252
Merged
bogner merged 1 commit intoMay 29, 2026
Conversation
…Descs SmallVectors BLASDesc and TLASDesc each hold a std::string plus default-inlined SmallVectors of large element types. In MSVC Debug builds (/MDd, _ITERATOR_DEBUG_LEVEL=2) the debug STL inflates std::string, which cascades through the nested SmallVectors and pushes sizeof(BLASDesc) past LLVM's CalculateSmallVectorDefaultInlinedElements static_assert (sizeof(T) <= 256). Release/RelWithDebInfo builds stay under the limit, which is why CI never caught it. Specify an explicit inline element count so SmallVector does not try to derive a default for the oversized element type. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bogner
approved these changes
May 29, 2026
Contributor
|
Merging this to get the post-commit CI green |
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.
Problem
AccelerationStructureDescsdeclares its lists with the defaultSmallVectorinline element count:BLASDescholds astd::stringplus two further default-inlinedSmallVectors (Triangles,AABBs), so its size compounds. Under MSVC's debug STL (/MDd,_ITERATOR_DEBUG_LEVEL=2),std::stringand the nested inline storage grow enough thatsizeof(BLASDesc)exceeds 256 bytes, tripping LLVM's assertion inCalculateSmallVectorDefaultInlinedElements:This breaks any Debug build with MSVC on Windows (
Pipeline.his included widely). Release / RelWithDebInfo builds -- including CI -- keep the types under the limit, so the failure isn't visible there.Fix
Give the lists an explicit inline element count, as the assertion recommends. Only
BLASDesctrips the assert today;TLASDeschas the same shape and sits just under the threshold, so it gets the same treatment for consistency and to avoid a latent break when fields are added. No functional change -- this only sets inline storage capacity.