Skip to content

[HIP] Port unit/launchBounds catch tests - #530

Merged
aakanksha555 merged 2 commits into
mainfrom
users/aakanksha555/hip-catch-port-launchbounds
Nov 6, 2026
Merged

aakanksha555 merged 2 commits into
mainfrom
users/aakanksha555/hip-catch-port-launchbounds

Conversation

@aakanksha555

@aakanksha555 aakanksha555 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Copy the launch_bounds Catch tests from rocm-systems. Only launch_bounds.cc is built; the other sources are compiler and hiprtc inputs. Link hiprtc and exclude nothing, matching upstream on amd_linux.

Ports unit/launchBounds (__launch_bounds__ attribute) from projects/hip-tests in ROCm/rocm-systems at 851d4028cb.

  1. Copy the sources verbatim, without upstream's CMakeLists.txt. launch_bounds.cc is the test, and launch_bounds_negative_kernels_rtc.hh is hiprtc input for its _RTC case. launch_bounds_compiler_error_kernels.cc and launch_bounds_parse_error_kernels.cc are currently unused, because the upstream compile-error checks that consume them are commented out.
  2. Add an entry to HipCatchTestLists.cmake:
    • SOURCES launch_bounds.cc, so the kernel input files aren't built as tests.
    • LINK_LIBS hiprtc, matching upstream's LINKER_LIBS.
    • No EXCLUDE_TESTS: upstream disables two cases only for amd_windows and amd_wsl.

The directory tree in CATCH_TESTS_README.md is updated.

Tested on gfx1030 with ROCm 10.1.0: check-hip-catch-unit-launchBounds runs 3 test cases, all passing.

Assisted-by: Claude Opus 5.5

Copy the __launch_bounds__ Catch tests from rocm-systems. Only
launch_bounds.cc is built; the other sources are compiler and hiprtc
inputs. Link hiprtc and exclude nothing, matching upstream on amd_linux.

@kasaurov kasaurov left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks! The vendored files are byte-identical to rocm-systems (unchanged since our framework sync point), and SOURCES, LINK_LIBS hiprtc and the empty EXCLUDE_TESTS all match upstream: the YAML only disables two cases for amd_windows. Two small nits:

  • launch_bounds_compiler_error_kernels.cc and launch_bounds_parse_error_kernels.cc are only used by upstream's compile-error checks, which are commented out in upstream's CMakeLists.txt (stale with clang 25+), so the README comment could say they're currently unused rather than "compiler input".
  • Could you mention in the description what you tested it on (GPU and ROCm version)?

Upstream's compile-error checks that would consume these files are
commented out, so the README should not call them compiler input.
@aakanksha555
aakanksha555 merged commit d3f64b9 into main Nov 6, 2026
3 checks passed
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.

2 participants