Repository navigation
Fix for thread limit tests - #323
Conversation
anujshuk-amd
left a comment
There was a problem hiding this comment.
SAMPLING_TIMEOUT
240
REWRITE_TIMEOUT
240
RUNTIME_TIMEOUT
360
anujshuk-amd
left a comment
There was a problem hiding this comment.
Updated suggested changes directly to the CmakeLists.txt
|
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. |
…#323) * SWDEV-532868 - Disable implicit wait in hipFree for async allocations * Fix compilation error
[ROCm/hip commit: 564ed55]
5dbf1b2 to
29da146
Compare
There was a problem hiding this comment.
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.
…mber of threads allowed. Signed-off-by: Anuj-Kumar Shukla <AnujKumar.Shukla@amd.com>
4eb41be to
28b87e3
Compare
|
Rebasing branch |
|
@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. |
* 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)
* 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>
* 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]
* 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]
Imported PR from ROCm/rocprofiler-systems#312
rocprofiler-systems Pull Request
Related Issue
What type of PR is this? (check all that apply)
Technical Details
Have you added or updated tests to validate functionality?
Added / Updated documentation?
Have you updated CHANGELOG?