Check hipSPARSELt for supported architectures#342
Open
zichguan-amd wants to merge 1 commit intoamd-stagingfrom
Open
Check hipSPARSELt for supported architectures#342zichguan-amd wants to merge 1 commit intoamd-stagingfrom
zichguan-amd wants to merge 1 commit intoamd-stagingfrom
Conversation
Signed-off-by: zichguan-amd <zichuan.guan@amd.com>
59c3370 to
f93a593
Compare
1 task
7 tasks
sshi-amd
added a commit
to sshi-amd/rocm-examples
that referenced
this pull request
Mar 10, 2026
…f hardcoding Replace hardcoded GPU architecture lists with runtime queries to the upstream libraries' CMake functions: - hipSPARSELt: Use hipsparselt_get_supported_architectures() plus the shared filter_hip_architectures() utility to check arch support. Removes hardcoded gfx942/gfx950 list and changes FATAL_ERROR to WARNING+return() in standalone builds for graceful skipping. - hipTensor: Use hiptensor_is_supported_architecture() to validate each arch at configure time. Moves find_package(hiptensor) earlier so the function is available. Removes hardcoded gfx908/gfx90a/gfx942/gfx950 list from all 20 leaf CMakeLists. Changes FATAL_ERROR to WARNING+return() and upgrades "Linux only" message from STATUS to WARNING. This ensures examples stay in sync with upstream library support automatically, without needing manual updates when architectures change. Resolves ROCm#342, ROCm#333 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
Motivation
Use hipSPARSELt's CMake fucntion to determine hipSPARSELt supported architectures. Do not build examples on unsupported architectures.
Technical Details
hipsparselt_validate_gpu_targetsthrows a fatal error which is not what we want, consult hipSPARSELt for supported ASICs withhipsparselt_get_supported_architecturesand emits a warning and skip the examples from building on unsupported ASICs.Test Plan
Azure CI gfx90a run
Test Result
Submission Checklist