-
Notifications
You must be signed in to change notification settings - Fork 118
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
use pipe instead of cin and c++ version detection fix #340
Conversation
I have no idea why the CI is failing. It runs perfectly fine on the raid.
|
I tested compressed |
return true; | ||
} | ||
|
||
free(buffer); // Free the buffer if getline failed or reached EOF |
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.
According to Linux man page for free(3p), no action happens if the argument is a null pointer... Nice job exploiting that characteristic.
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.
power of chatgpt. Most of this is written by ChatGPT. lol
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.
Please take a look at my comments, mainly regarding the constructor of class PipeReader
. Thanks!
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.
looks good to me
I just realized, after adding this |
Because the
std::cin
is unique, when printing out the trace to cin, thecin
must be drained first before the next kernel is printed to the cini.e.
cin is serialized.
Currently, the trace parser first parses the first several lines, looking for kernel info. Then, the rest of the traces are loaded TB by TB (
get_next_threadblock_traces
).This works fine when only 1 kernel is running. The
cin
looks like:But when there is 2+ kernels, for example, multi-stream concurrent, the kernel 2 info is after the kernel 1 traces in the
cin
buffer. The parser cannot parse kernel 2 info before kernel1 traces are drained. But kernel 2 must be able to be parsed at any time.To fix this, we removed
cin
, fstream, and load from pipe directly. Each kernel has it's own pipe.Also, Ubuntu 22.04 comes with C++ version 11, the old version detection only looks for 1 digit. This is addressed as well.