[stinkytofu] Fix stale-check for stinkytofu sources in rocisa#7197
Open
[stinkytofu] Fix stale-check for stinkytofu sources in rocisa#7197
Conversation
The staleness detection in rocisa's __init__.py was broken for stinkytofu sources: the _build_info.py template referenced @STINKYTOFU_DIR@ which was never defined, causing STINKYTOFU_SOURCE_ROOT to resolve to an empty string. Fix by renaming STINKYTOFU_TOP_DIR to STINKYTOFU_ROOT_DIR with PARENT_SCOPE so it propagates from stinkytofu's CMakeLists.txt up to callers (rocisa standalone build, hipblaslt subdirectory build). Also fix `invoke rocisa` for theRock SDK environments: - Add _detect_rocm() to find ROCm via ROCM_PATH env, rocm-sdk CLI, or /opt/rocm fallback (matching stinkytofu's pattern) - Pass ROCM_PATH to CMake so find_package(hip) works outside /opt/rocm - Pass ROCISA_INCLUDE_BUILD_INFO=ON so _build_info.py is installed in editable dev builds (excluded from release wheels)
Replace the old "Rebuilding rocisa after C++ changes" section with a clear table showing which command to run for each type of change, and note that invoke build-client does not rebuild the Python module.
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (77.83%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #7197 +/- ##
===========================================
- Coverage 65.22% 65.22% -0.00%
===========================================
Files 2083 2083
Lines 323504 323508 +4
Branches 42437 42437
===========================================
Hits 211003 211003
- Misses 94953 94957 +4
Partials 17548 17548
*This pull request uses carry forward flags. Click here to find out more. 🚀 New features to boost your workflow:
|
geotseng-amd
approved these changes
May 9, 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.
Summary
_build_info.pytemplate referenced@STINKYTOFU_DIR@which was never set —STINKYTOFU_SOURCE_ROOTalways resolved to an empty string.STINKYTOFU_TOP_DIR→STINKYTOFU_ROOT_DIRwithPARENT_SCOPEso it propagates from stinkytofu's CMake scope to callers (rocisa standalone, hipblaslt subdirectory builds).invoke rocisafor theRock SDK environments by auto-detecting ROCm path (matching stinkytofu's_detect_rocm()pattern).ROCISA_INCLUDE_BUILD_INFOcmake option so_build_info.pyis installed in editable dev builds but excluded from release wheels.Developer workflow
First-time setup
After editing rocisa or stinkytofu C++ sources
# Re-run invoke rocisa to rebuild _rocisa.so with your changes invoke rocisainvoke build-clientdoes not rebuild the rocisa Python module (_rocisa.so). If you edit stinkytofu or rocisa C++ code and only runinvoke build-client, the stale-check will now correctly warn you on the nextimport rocisa:Test plan
invoke rocisasucceeds on theRock SDK (previously failed withfind_package(hip)error)import rocisaworks after installimport rocisaraisesImportErrorwith rebuild hint_build_info.pyhas correctSTINKYTOFU_SOURCE_ROOTpath (was empty before)pip uninstall rocisacleans up🤖 Generated with Claude Code