You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pthread_detach man page.
'''
The detached attribute merely determines the behavior of the
system when the thread terminates; it does not prevent the thread
from being terminated if the process terminates using exit(3) (or
equivalently, if the main thread returns).
''''
I think this case is mainly to check the new thread not have stream dependence(one thread with hipStreamPerThread exit, not effect other threads).
what about add a rand sleep in below function (Copy_to_device) to check the dependence? and change detach to join.
Hi @kevin-gjm, the pthread documentation is not relevant here as the test uses std::threads. The comments in the test identify the scenario that is being tested and what we're watching for in this test:
Scenario : App pushes Async task(s) into hipStreamPerThread and did not wait for it to complete.
Watch out : Incomplete task in hipStreamPerThread should not cause any crash due to thread exit.
This test is not meant to cover the full functionality of hipStreamPerThread, but only to test this specific scenario. Additional tests covering more of hipStreamPerThread can be found in the parent directory.
in the test case, after detach the created thread also exited. I think the case can't fully test the function of "hipStreamPerThread".
hip-tests/catch/unit/streamperthread/hipStreamPerThread_MultiThread.cc
Line 53 in f5deb13
pthread_detach man page.
'''
The detached attribute merely determines the behavior of the
system when the thread terminates; it does not prevent the thread
from being terminated if the process terminates using exit(3) (or
equivalently, if the main thread returns).
''''
I think this case is mainly to check the new thread not have stream dependence(one thread with hipStreamPerThread exit, not effect other threads).
what about add a rand sleep in below function (Copy_to_device) to check the dependence? and change detach to join.
https://github.com/ROCm/hip-tests/blob/f5deb13ce32126176fdae4ed6b3c38ab792738ef/catch/unit/streamperthread/hipStreamPerThread_MultiThread.cc#L24C17-L24C17
The text was updated successfully, but these errors were encountered: