Tensile: report failed placeholder library loads before dereferencing - #12335
Open
AyushRajSharma wants to merge 1 commit into
Open
AyushRajSharma wants to merge 1 commit into
AyushRajSharma wants to merge 1 commit into
Conversation
✅ All Policy Checks Passed
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
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.
A missing lazy Tensile database makes LoadLibraryFile return null. PlaceholderLibrary::loadPlaceholderLibrary dereferences that result while obtaining the inner library, causing a segmentation fault during solution lookup. This is the failure path reported in ROCm/TheRock#7790.
Check that the loaded object is a master solution library with a usable inner library before publishing it. Throw an exception containing the requested path on failure. Keep the placeholder unloaded so a subsequent call can retry after the file is restored. Do not substitute a differently named database, whose solution indices and code objects may be incompatible.
Add MessagePack-backed host regressions for missing and malformed files, all solution-query entry points, successful loading and cache reuse, and retry after restoration.
Validation: built the real TensileHost library and MessagePack loader in a Linux CPU-only harness using ROCm Clang. The new missing-file regression exits with SIGSEGV (139) against the original header. With the patch, all five tests pass, including successful parsing, cached reuse, and retry after restoration. The harness uses host-only HIP compilation, real HIP headers, and a compatibility include for an unrelated unqualified std::min call; no loader mocks or GPU dispatch are involved.
Related to ROCm/TheRock#7790.
Companion TheRock PR: ROCm/TheRock#8371