-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make CollectTrace for profiling by iteration async #966
base: main
Are you sure you want to change the base?
Conversation
if (!stopByIterThread) { | ||
std::lock_guard<std::mutex> guard(mutex_); | ||
if (!stopByIterThread) { | ||
stopByIterThread = new std::thread([collection_done, this, now](){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std_make_unique
std::lock_guard<std::mutex> guard(mutex_); | ||
if (stopByIterThread) { | ||
stopByIterThread->join(); | ||
delete stopByIterThread; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with unique ptr this woudl be stopByIterThread.reset()
Thank you for those helpful tips, I'll improve this pr as comments advised. |
2bfb538
to
1af59c6
Compare
@briancoutinho It seems this pr is ignored after last commit. I've rebased master branch, please take some time to re-review this pr, thank you. |
Hi, sorry am out for 1 1/2 week, will take a look once I'm back. you can
also ask @
sraikund16 for a review
Thx
…On Fri, Aug 30, 2024 at 12:38 AM Augusto Yao ***@***.***> wrote:
@briancoutinho <https://github.com/briancoutinho> It seems this pr is
ignored after last commit. I've rebased master branch, please take some
time to re-review this pr, thank you.
—
Reply to this email directly, view it on GitHub
<#966 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABUZ7ZCZM47WFP4YYUGFAELZUAOOLAVCNFSM6AAAAABLQGOI7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRQGM2TMMRUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@briancoutinho it's ok. @sraikund16 would you like to review this pr? |
This fix issue #953. Makes
libkineto::api().client()->stop()
andstopTraceInternal
run inprofilerThread_
so that, the training process will not be blocked.