Skip to content

Fix for thread limit tests - #323

Merged
dgaliffiAMD merged 5 commits into
developfrom
users/anujshuk/thread-limit-test
Oct 9, 2025
Merged

dgaliffiAMD merged 5 commits into
developfrom
users/anujshuk/thread-limit-test

Conversation

@dgaliffiAMD

Copy link
Copy Markdown
Contributor

Imported PR from ROCm/rocprofiler-systems#312

rocprofiler-systems Pull Request

Related Issue

  • SWDEV-511619

What type of PR is this? (check all that apply)

  • Bug Fix
  • Cherry Pick
  • Continuous Integration
  • Documentation Update
  • Feature
  • Optimization
  • Refactor
  • Other (please specify)

Technical Details

Have you added or updated tests to validate functionality?

  • Yes
  • No - does not apply to this PR

Added / Updated documentation?

  • Yes
  • No - does not apply to this PR

Have you updated CHANGELOG?

  • Yes
  • No - does not apply to this PR

@anujshuk-amd anujshuk-amd 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.

SAMPLING_TIMEOUT
240
REWRITE_TIMEOUT
240
RUNTIME_TIMEOUT
360

@anujshuk-amd anujshuk-amd self-assigned this Aug 13, 2025

@adjordje-amd adjordje-amd 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

@anujshuk-amd anujshuk-amd 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.

Updated suggested changes directly to the CmakeLists.txt

@dgaliffiAMD

Copy link
Copy Markdown
Contributor Author

Can we catch this at runtime and fail more gracefully? I'm okay with unblocking the workflow but a user can still write an application with 4097 threads and hit this same failure.
If we can't overcome the limit, maybe we can stop collecting data after the 4096th thread and output a warning to the logs.

cfallows-amd pushed a commit that referenced this pull request Aug 18, 2025
…#323)

* SWDEV-532868 - Disable implicit wait in hipFree for async allocations

* Fix compilation error
jayhawk-commits pushed a commit that referenced this pull request Aug 18, 2025
…#323)

* SWDEV-532868 - Disable implicit wait in hipFree for async allocations

* Fix compilation error

[ROCm/clr commit: 58df225]
jayhawk-commits pushed a commit that referenced this pull request Aug 18, 2025
@dgaliffiAMD
dgaliffiAMD force-pushed the users/anujshuk/thread-limit-test branch from 5dbf1b2 to 29da146 Compare August 27, 2025 21:26
Copilot AI review requested due to automatic review settings September 26, 2025 12:11

Copilot AI 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.

Pull Request Overview

This PR fixes thread limit tests that were failing due to exceeding allowed thread counts by implementing a maximum thread limit of 4096 and updating the test infrastructure to properly handle various thread count scenarios.

  • Updates CMake test configuration to loop through multiple thread values and properly handle cases above the limit
  • Adds runtime enforcement of the 4096 thread limit in the pthread creation wrapper
  • Replaces single hardcoded test with parameterized tests for better coverage

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
projects/rocprofiler-systems/tests/source/CMakeLists.txt Refactors thread limit tests to use multiple test values and proper limit handling
projects/rocprofiler-systems/source/lib/rocprof-sys/library/components/pthread_create_gotcha.cpp Adds thread limit enforcement and early return when max threads exceeded

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@dgaliffiAMD
dgaliffiAMD force-pushed the users/anujshuk/thread-limit-test branch from 4eb41be to 28b87e3 Compare October 3, 2025 20:27
@dgaliffiAMD

Copy link
Copy Markdown
Contributor Author

Rebasing branch

@dgaliffiAMD

Copy link
Copy Markdown
Contributor Author

@anujshuk-amd, looks good to me. Do you really need to increase the timeout values? It looks like there is plenty of time remaining on our runners.

@dgaliffiAMD
dgaliffiAMD merged commit 182a750 into develop Oct 9, 2025
3 checks passed
@dgaliffiAMD
dgaliffiAMD deleted the users/anujshuk/thread-limit-test branch October 9, 2025 23:07
systems-assistant Bot pushed a commit to ROCm/rocprofiler-systems that referenced this pull request Oct 9, 2025
* Fix for thread limit tests. Which are failing due to exceeding the number of threads allowed.

Signed-off-by: Anuj-Kumar Shukla <AnujKumar.Shukla@amd.com>

* Update CMakeLists.txt

* Stopping thread creation after max thread limit

* Adressed review comments

* Update projects/rocprofiler-systems/tests/source/CMakeLists.txt
[rocm-systems] ROCm/rocm-systems#323 (commit 182a750)
ammallya pushed a commit that referenced this pull request Nov 17, 2025
* Update to remove vram enum and instead use the string directly from the driver.

Signed-off-by: Narlo, Joseph <Joseph.Narlo@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
ammallya pushed a commit that referenced this pull request Nov 18, 2025
* Update to remove vram enum and instead use the string directly from the driver.

Signed-off-by: Narlo, Joseph <Joseph.Narlo@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: f71ae88]
ammallya pushed a commit that referenced this pull request Nov 21, 2025
* Update to remove vram enum and instead use the string directly from the driver.

Signed-off-by: Narlo, Joseph <Joseph.Narlo@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>

[ROCm/amdsmi commit: f71ae88]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants