Skip to content

Enable hip-tests on TheRock - #2001

Merged
cjatin merged 3 commits into
mainfrom
users/jatin/hip-tests
Jan 13, 2026
Merged

cjatin merged 3 commits into
mainfrom
users/jatin/hip-tests

Conversation

@cjatin

@cjatin cjatin commented Nov 3, 2025 •

Copy link
Copy Markdown
Contributor

Motivation

Enable hip-tests execution on TheRock linux and windows.
Aligns installation path of hip-tests on linux and Windows
enables sharding of hip-tests

Details

Enable hip-tests execution on TheRock linux and windows.

This PR fixes -
#1354

Hip-tests source that gets built/executed as part of this PR
https://github.com/ROCm/rocm-systems/tree/develop/projects/hip-tests/catch

Related PRs to enable build/execution of tests -
#2373 - enables building of tests
ROCm/rocm-systems#1624 - prepares rocm-systems to be built with catchlib from upstream , compiler/hip detection, packaging change
ROCm/rocm-systems#2187 - aligns installation path for linux and windows

few other script changes to have compatible builds on older build frameworks.
https://github.com/AMD-ROCm-Internal/build-infra/pull/316
https://github.com/AMD-Radeon-Driver/compute-utils/pull/169
https://github.com/AMD-Radeon-Driver/compute-utils/pull/171
hip-tests executed and verified successfully

Submission Checklist

@jayhawk-commits

Copy link
Copy Markdown
Contributor

Do you have any workflow runs that combine the changes from this PR with the code changes from ROCm/rocm-systems#1624 ?

Comment thread core/CMakeLists.txt Resolved
Comment thread core/CMakeLists.txt Resolved
Comment thread core/CMakeLists.txt Resolved
Comment thread core/CMakeLists.txt Outdated
Comment on lines +211 to +214
# Non-Windows CLR options.
list(APPEND HIP_TESTS_RUNTIME_DEPS
hip-clr
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this only a runtime dep on Linux? hip-clr is available and used on Windows too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@jayhawk-commits

Copy link
Copy Markdown
Contributor

Going to change the submodule of rocm-systems to match branch from ROCm/rocm-systems#1624

@jayhawk-commits

Copy link
Copy Markdown
Contributor

Nevermind. Complaining about conflicts in the submodule, but that should be the sequence to test the changes.

@agunashe
agunashe marked this pull request as ready for review November 11, 2025 20:32
@jayhawk-commits

Copy link
Copy Markdown
Contributor

I don't see hip-tests build logs, but I do see the "including subproject" portion in the logs.

@cjatin

cjatin commented Nov 13, 2025

Copy link
Copy Markdown
Contributor Author

I don't see hip-tests build logs, but I do see the "including subproject" portion in the logs.

Which CI job will have that information?

@ScottTodd

Copy link
Copy Markdown
Member

I don't see hip-tests build logs, but I do see the "including subproject" portion in the logs.

Which CI job will have that information?

Get the build working locally first. I also see the configure completes: https://github.com/ROCm/TheRock/actions/runs/19278473408/job/55124041856#step:10:485 but the new subproject is not built (no longs in either the full build output or https://therock-ci-artifacts.s3.amazonaws.com/19278473408-linux/logs/gfx1151/index.html).

I suspect since there are no other subprojects depending on this project and the project does not provide an artifact, building --target therock-dist therock-archives does not build it. You should add an artifact, following https://github.com/ROCm/TheRock/blob/main/docs/development/artifacts.md

@agunashe

Copy link
Copy Markdown
Contributor

I don't see hip-tests build logs, but I do see the "including subproject" portion in the logs.

Which CI job will have that information?

Get the build working locally first. I also see the configure completes: https://github.com/ROCm/TheRock/actions/runs/19278473408/job/55124041856#step:10:485 but the new subproject is not built (no longs in either the full build output or https://therock-ci-artifacts.s3.amazonaws.com/19278473408-linux/logs/gfx1151/index.html).

I suspect since there are no other subprojects depending on this project and the project does not provide an artifact, building --target therock-dist therock-archives does not build it. You should add an artifact, following https://github.com/ROCm/TheRock/blob/main/docs/development/artifacts.md

Added the artifacts for hip-tests. Hopefully the tests are now built

https://github.com/ROCm/TheRock/pull/2001/files#diff-8f52846645b80806e11fbe318820659ca6d81d2fe305d815bb97f62d2102e1fdR236

Comment thread core/artifact-core-hiptests.toml Resolved
Comment thread core/CMakeLists.txt Outdated
TARGETS USE_DIST_AMDGPU_TARGETS
DESCRIPTOR artifact-core-hiptests.toml
COMPONENTS
run

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See above, should most likely be test.

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.

sure thanks. ill make this change.

Comment thread requirements.txt Outdated
redshift_connector==2.1.8

# hip-tests
rpm

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is rpm needed for?

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.

hip-tests artifacts is packaged into deb, tar, rpm files.
So we need "sudo apt install rpm " on the system to generate the rpm artifact file.

I see linux packages are manually installed in the instructions. Any way to have this rpm package installed ?
or I can skip rpm for now

@jayhawk-commits

Copy link
Copy Markdown
Contributor

I see hip-tests being built now.
gfx942 build logs: https://therock-ci-artifacts.s3.amazonaws.com/19349642564-linux/logs/gfx94X-dcgpu/index.html
gfx942 artifacts: https://therock-ci-artifacts.s3.amazonaws.com/19349642564-linux/index-gfx94X-dcgpu.html

@jayhawk-commits

Copy link
Copy Markdown
Contributor

The sequence should now be:

@agunashe

Copy link
Copy Markdown
Contributor

The sequence should now be:

we need to verify the test execution of the test binaries.

@jayhawk-commits

Copy link
Copy Markdown
Contributor

The sequence should now be:

we need to verify the test execution of the test binaries.

If you want to do that within this PR, then take a look at this example #1380
Add a section for hip-clr in fetch_test_configurations.py and create new test_*.py files.

@mgehre-amd

Copy link
Copy Markdown
Contributor

I'm curious, why is the sudo needed to run ctest? I don't think the other tests have that.

@agunashe

Copy link
Copy Markdown
Contributor

I'm curious, why is the sudo needed to run ctest? I don't think the other tests have that.

our tests generates some _test.cmake files which caches the test names at runtime. These files are part of catch/ctest framework. <install_path>/share/hip is a read only path. So the sudo was required to ovewrite this issue. Without it the _test.cmake files cannot be created by the catch/ctest framework causing the tests to fail

@stellaraccident

Copy link
Copy Markdown
Collaborator

I think I might have just mid-air collided with you in: 91dc209

Now artifacts have to be declared in BUILD_TOPOLOGY.toml in the root. You should get a CMake error telling you this once you rebase. If you run into problems with this, I can push an update to the branch tomorrow with the necessary changes but should be pretty mechanical (and it will fail on configure if done wrong so should be low cost to fix).

@agunashe

Copy link
Copy Markdown
Contributor

I think I might have just mid-air collided with you in: 91dc209

Now artifacts have to be declared in BUILD_TOPOLOGY.toml in the root. You should get a CMake error telling you this once you rebase. If you run into problems with this, I can push an update to the branch tomorrow with the necessary changes but should be pretty mechanical (and it will fail on configure if done wrong so should be low cost to fix).

Thank you for the comment. I added the hip-tests artifact to the BUILD_TOPOLOGY.toml in the root.
the tests seems to be executed fine in the latest run

@agunashe
agunashe requested review from ScottTodd, agunashe and marbre and removed request for ScottTodd November 27, 2025 03:58

@geomin12 geomin12 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.

looking good, just some cleanup comments

"hip-tests": {
"job_name": "hip-tests",
"fetch_artifact_args": "--tests",
"timeout_minutes": 120, # it failed for 120 mins, fix it when we address sharding.

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.

can remove comment, also we are allotting 300 minutes total for tests.

right now, this runs for 480 minutes, which is pretty long!!! let's do 60 mins with 4 shards (we can adjust based on test results in the CI)

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.

I have removed the comment and kept the timeout as 120.
after few days of execution, we can trim it down to a smaller number

Comment thread core/artifact-core-hiptests_win.toml Resolved
Comment thread rocm-systems Resolved
benrichard-amd pushed a commit to benrichard-amd/TheRock that referenced this pull request Jan 5, 2026
## Motivation

This change enables hip-tests to be built on TheRock. This is the first
step in getting hip-tests building/running with TheRock.

## Technical Details

Enable hip-tests to be built with TheRock, when user enables testing via
flag `THEROCK_BUILD_TESTING`.


[hip-tests](https://github.com/ROCm/rocm-systems/tree/develop/projects/hip-tests/catch)
are collection of tests that are used to test the hip-runtime.

A corresponding PR is also required in hip-tests to make it compatible
with TheRock, which are being done
[here](ROCm/rocm-systems#1624).

Subsequent PRs are required to run the built hip-tests which will follow
after this PR.

ROCm/rocm-systems#2187 - PR will fix the paths
to be consistent across linux and windows.
 Below issues will be fixed with it
https://github.com/ROCm/TheRock/pull/2373/files#r2582804642  
ROCm#2373 (comment) 
ROCm#2001 (comment)
ROCm#2001 (comment)


## Test Plan

The build should complete end to end without failures, next set of
changes will enable the running of tests.

## Test Result

NA

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
@cjatin
cjatin force-pushed the users/jatin/hip-tests branch from da80bf4 to 5322e1e Compare January 7, 2026 11:49
@stellaraccident stellaraccident mentioned this pull request Jan 8, 2026
1 task done
@stellaraccident

Copy link
Copy Markdown
Collaborator

Hi @cjatin - I noticed there's also PR #2706 ("Start running hip-tests on TheRock") which appears to cover similar ground to this PR.

Since this PR was updated more recently, I'm assuming this is the active effort. Could you confirm and consider converting #2706 to draft or closing it if it's superseded? That would help reduce confusion for reviewers.

Thanks for working on getting hip-tests running in CI - this is valuable testing infrastructure!

@cjatin

cjatin commented Jan 9, 2026

Copy link
Copy Markdown
Contributor Author

Hi @cjatin - I noticed there's also PR #2706 ("Start running hip-tests on TheRock") which appears to cover similar ground to this PR.

Since this PR was updated more recently, I'm assuming this is the active effort. Could you confirm and consider converting #2706 to draft or closing it if it's superseded? That would help reduce confusion for reviewers.

Thanks for working on getting hip-tests running in CI - this is valuable testing infrastructure!

Hey @stellaraccident closed the other one.

@jayhawk-commits jayhawk-commits 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.

LGTM but this PR has "changes requested" status

Multi-sharding hip-tests can be done in a separate PR.

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Marking as "reviewed", and I "resolved" most of the open conversation threads. In case it gets lost in the noise, this thread is still open and has legitimate concerns about sharding and test suite size for running smoketests: #2001 (comment)

@geomin12
geomin12 self-requested a review January 12, 2026 17:26

@geomin12 geomin12 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 great overall, I added a comment regarding sharding, which will help get this test to a reasonable test time

Another point, I notice that hip-test ci:smoke is lodged into the code, is it possible to enable smoke tests for this test as well? Any filters available for smoke tests?

Comment on lines +100 to +101
"-I",
f"{index_start},{index_end}",

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.

Suggested change
"-I",
f"{index_start},{index_end}",
# shards the tests by running a specific set of tests based on starting test (shard_index) and stride (total_shards)
"--tests-information",
f"{shard_index},,{total_shards}",

This will shard the tests properly with TheRock + ctest (this implementation only seems to pick up a specific set of tests)

That way, this will get a reasonable test time

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This check with SHARD_INDEX kind of worked, because of how TheRock scheduled each shard. -j will cause issues.

cmd = [
"ctest",
"-I",
f"{index_start},{index_end}",

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.

can we also include -j flag (parallelization)? if this is enabled and we get test times down to ~ 20 mins total, we won't need those test filters

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We can not use -j right now with hip-tests. almost all HIP tests run the test on default device which will be device 0. When we run multi threaded tests, multiple tests will enqueue stuff on device 0 which can causes some tests to fail which run timing based checks.
Ideally this should be sorted, but it will take some time.

@ScottTodd ScottTodd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM when Geo approves. We can tune the set of tests that run at each stage either in this PR or (fast) follow-ups. This test coverage is important but we need to not let that detail slip.

@cjatin

cjatin commented Jan 13, 2026

Copy link
Copy Markdown
Contributor Author

looks great overall, I added a comment regarding sharding, which will help get this test to a reasonable test time

Another point, I notice that hip-test ci:smoke is lodged into the code, is it possible to enable smoke tests for this test as well? Any filters available for smoke tests?

Replied on -j query.

Regarding smoke tests, that entry is in rocm-systems repo. hip-tests at the moment does not have a set of smoke tests, right now. There are some efforts in that direction, but it might take some time to gather a list of tests which can be categorized as smoke tests.

@geomin12 geomin12 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.

As discussed with Joseph offline, we should land this PR as hip-tests is quite important to the ROCm org and to get these tests enabled. The 43 mins is not ideal, but I will work on sharding in a follow-up PR

Works here: https://github.com/ROCm/TheRock/actions/runs/20786256084/job/59901495774 (I had to rebase due to main branch mess)

@cjatin
cjatin merged commit f5524a6 into main Jan 13, 2026
17 checks passed
@cjatin
cjatin deleted the users/jatin/hip-tests branch January 13, 2026 20:17
@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage Jan 13, 2026
subodh-dubey-amd pushed a commit that referenced this pull request Jan 14, 2026
## Motivation

Enable hip-tests execution on TheRock linux and windows. 
Aligns installation path of hip-tests on linux and Windows
enables sharding of hip-tests 

## Details

Enable hip-tests execution on TheRock linux and windows. 

**This PR fixes -** 
#1354

**Hip-tests source that gets built/executed as part of this PR**

https://github.com/ROCm/rocm-systems/tree/develop/projects/hip-tests/catch

**Related PRs to enable build/execution of tests -**
#2373 - enables building of tests
ROCm/rocm-systems#1624 - prepares rocm-systems
to be built with catchlib from upstream , compiler/hip detection,
packaging change
ROCm/rocm-systems#2187 - aligns installation
path for linux and windows

**few other script changes to have compatible builds on older build
frameworks.**
https://github.com/AMD-ROCm-Internal/build-infra/pull/316
https://github.com/AMD-Radeon-Driver/compute-utils/pull/169
https://github.com/AMD-Radeon-Driver/compute-utils/pull/171
hip-tests executed and verified successfully

## Submission Checklist

- [x] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.

---------

Co-authored-by: Geo Min <geomin12@amd.com>
@ScottTodd

Copy link
Copy Markdown
Member

Any updates or ETA on getting the "smoke" filter configured? We have data now showing that these newly added tests are contributing significantly to long queue times for our Windows gfx1151 test runners: #3050

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

10 participants