Skip to content

Check hipSPARSELt for supported architectures#342

Open
zichguan-amd wants to merge 1 commit intoamd-stagingfrom
zichguan/hipsparselt-asic
Open

Check hipSPARSELt for supported architectures#342
zichguan-amd wants to merge 1 commit intoamd-stagingfrom
zichguan/hipsparselt-asic

Conversation

@zichguan-amd
Copy link
Copy Markdown
Collaborator

Motivation

Use hipSPARSELt's CMake fucntion to determine hipSPARSELt supported architectures. Do not build examples on unsupported architectures.

Technical Details

hipsparselt_validate_gpu_targets throws a fatal error which is not what we want, consult hipSPARSELt for supported ASICs with hipsparselt_get_supported_architectures and emits a warning and skip the examples from building on unsupported ASICs.

Test Plan

Azure CI gfx90a run

Test Result

Submission Checklist

@zichguan-amd zichguan-amd requested a review from a team as a code owner November 3, 2025 20:20
Signed-off-by: zichguan-amd <zichuan.guan@amd.com>
@zichguan-amd zichguan-amd force-pushed the zichguan/hipsparselt-asic branch from 59c3370 to f93a593 Compare November 3, 2025 20:21
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant