Skip to content

Tensile: report failed placeholder library loads before dereferencing - #12335

Open
AyushRajSharma wants to merge 1 commit into
ROCm:developfrom
AyushRajSharma:fix/7790-tensile-fallback
Open

AyushRajSharma wants to merge 1 commit into
ROCm:developfrom
AyushRajSharma:fix/7790-tensile-fallback

Conversation

@AyushRajSharma

@AyushRajSharma AyushRajSharma commented Sep 19, 2026

Copy link
Copy Markdown

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

@therock-pr-bot

Copy link
Copy Markdown

✅ All Policy Checks Passed

Check Status Details
📝 PR Description ✅ Pass
Forbidden Files ✅ Pass
🧪 Unit Test ✅ Pass
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

🎉 All policy checks passed!

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external contribution Code contribution from users community.. project: rocblas shared: tensile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant